[Android] SlidingPaneLayout: trigger the listener events even when the first layout has not yet occured
Adrien Maglo
git at videolan.org
Mon Feb 24 17:54:03 CET 2014
vlc-ports/android | branch: master | Adrien Maglo <magsoft at videolan.org> | Mon Feb 24 17:53:54 2014 +0100| [b2f09c84dbe93cea50473d5690612b455fa7f82e] | committer: Adrien Maglo
SlidingPaneLayout: trigger the listener events even when the first layout has not yet occured
> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=b2f09c84dbe93cea50473d5690612b455fa7f82e
---
vlc-android/src/org/videolan/vlc/widget/SlidingPaneLayout.java | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/vlc-android/src/org/videolan/vlc/widget/SlidingPaneLayout.java b/vlc-android/src/org/videolan/vlc/widget/SlidingPaneLayout.java
index 8c43315..c03d37e 100644
--- a/vlc-android/src/org/videolan/vlc/widget/SlidingPaneLayout.java
+++ b/vlc-android/src/org/videolan/vlc/widget/SlidingPaneLayout.java
@@ -565,6 +565,8 @@ public class SlidingPaneLayout extends ViewGroup {
private boolean closePane(View pane, int initialVelocity) {
if (mFirstLayout) {
mState = STATE_CLOSED;
+ if (mPanelSlideListener != null)
+ mPanelSlideListener.onPanelClosed();
return true;
}
else if (smoothSlideTo(0.f, initialVelocity))
@@ -576,6 +578,8 @@ public class SlidingPaneLayout extends ViewGroup {
private boolean openPaneEntirely(View pane, int initialVelocity) {
if (mFirstLayout) {
mState = STATE_OPENED_ENTIRELY;
+ if (mPanelSlideListener != null)
+ mPanelSlideListener.onPanelOpenedEntirely();
return true;
}
else if (smoothSlideTo(1.f, initialVelocity))
@@ -587,6 +591,8 @@ public class SlidingPaneLayout extends ViewGroup {
private boolean openPane(View pane, int initialVelocity) {
if (mFirstLayout) {
mState = STATE_OPENED;
+ if (mPanelSlideListener != null)
+ mPanelSlideListener.onPanelOpened();
return true;
}
else if (smoothSlideTo(1 - (float)mOverhangSize / mSlideRange, initialVelocity))
More information about the Android
mailing list