[Android] Audio player: slide down the audio player on back key pressed when it is entirely shown

Adrien Maglo git at videolan.org
Fri Jan 17 10:36:46 CET 2014


vlc-ports/android | branch: master | Adrien Maglo <magsoft at videolan.org> | Fri Jan 17 10:36:39 2014 +0100| [7c965f8236c336238decaf598404ec4f0ac550a6] | committer: Adrien Maglo

Audio player: slide down the audio player on back key pressed when it is entirely shown

> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=7c965f8236c336238decaf598404ec4f0ac550a6
---

 vlc-android/src/org/videolan/vlc/gui/MainActivity.java |    7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/vlc-android/src/org/videolan/vlc/gui/MainActivity.java b/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
index f71b1ef..6454d40 100644
--- a/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
@@ -406,6 +406,13 @@ public class MainActivity extends SherlockFragmentActivity {
             mMenu.showContent();
             return;
         }
+
+        // Slide down the mini player if it is shown entirely.
+        if (mSlidingPane.getState() == mSlidingPane.STATE_CLOSED) {
+            mSlidingPane.openPane();
+            return;
+        }
+
         // If it's the directory view, a "backpressed" action shows a parent.
         if (mCurrentFragment.equals("directories")) {
             DirectoryViewFragment directoryView = (DirectoryViewFragment) getFragment(mCurrentFragment);



More information about the Android mailing list