[Android] Avoid the annoying "flickering" effect of the mini player

Ludovic Fauvet git at videolan.org
Mon May 27 19:06:13 CEST 2013


vlc-ports/android | branch: master | Ludovic Fauvet <etix at videolan.org> | Mon May 27 18:14:14 2013 +0200| [1b0849261ed47f0cabce72148ec1c690b43b4150] | committer: Ludovic Fauvet

Avoid the annoying "flickering" effect of the mini player

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

 vlc-android/src/org/videolan/vlc/widget/AudioMiniPlayer.java |    9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/vlc-android/src/org/videolan/vlc/widget/AudioMiniPlayer.java b/vlc-android/src/org/videolan/vlc/widget/AudioMiniPlayer.java
index 6c2bcb6..e7e0806 100644
--- a/vlc-android/src/org/videolan/vlc/widget/AudioMiniPlayer.java
+++ b/vlc-android/src/org/videolan/vlc/widget/AudioMiniPlayer.java
@@ -20,6 +20,7 @@
 
 package org.videolan.vlc.widget;
 
+import android.app.Activity;
 import org.videolan.vlc.R;
 import org.videolan.vlc.gui.audio.AudioPlayerActivity;
 import org.videolan.vlc.interfaces.IAudioPlayer;
@@ -115,6 +116,14 @@ public class AudioMiniPlayer extends Fragment implements IAudioPlayer {
     }
 
     @Override
+    public void onAttach(Activity activity) {
+        super.onAttach(activity);
+
+        // The player should not be visible in the first place
+        hide();
+    }
+
+    @Override
     public void onCreateContextMenu(ContextMenu menu, View v,
             ContextMenuInfo menuInfo) {
         super.onCreateContextMenu(menu, v, menuInfo);



More information about the Android mailing list