[Android] AudioPlayerActivity: fix the white problem

Edward Wang git at videolan.org
Fri Feb 8 16:24:11 CET 2013


vlc-ports/android | branch: master | Edward Wang <edward.c.wang at compdigitec.com> | Fri Feb  8 10:21:09 2013 -0500| [3574e6b4747bc3a785b3abc929c7e8db8a885329] | committer: Edward Wang

AudioPlayerActivity: fix the white problem

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

 .../src/org/videolan/vlc/gui/audio/AudioPlayerActivity.java     |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/gui/audio/AudioPlayerActivity.java b/vlc-android/src/org/videolan/vlc/gui/audio/AudioPlayerActivity.java
index ad6b649..daa7c55 100644
--- a/vlc-android/src/org/videolan/vlc/gui/audio/AudioPlayerActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/audio/AudioPlayerActivity.java
@@ -1,7 +1,7 @@
 /*****************************************************************************
  * AudioPlayerActivity.java
  *****************************************************************************
- * Copyright © 2011-2012 VLC authors and VideoLAN
+ * Copyright © 2011-2013 VLC authors and VideoLAN
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -27,6 +27,7 @@ import org.videolan.vlc.AudioServiceController;
 import org.videolan.vlc.R;
 import org.videolan.vlc.RepeatType;
 import org.videolan.vlc.Util;
+import org.videolan.vlc.VLCApplication;
 import org.videolan.vlc.gui.AdvFuncDialog;
 import org.videolan.vlc.gui.MainActivity;
 import org.videolan.vlc.gui.SpeedSelectorDialog;
@@ -347,7 +348,9 @@ public class AudioPlayerActivity extends Activity implements IAudioPlayer {
             return;
         }
 
-        PopupMenu popupMenu = new PopupMenu(this, v);
+        // Inherit native app context to get the new style
+        // If we use this (Activity) context we get the ugly white style
+        PopupMenu popupMenu = new PopupMenu(VLCApplication.getAppContext(), v);
         popupMenu.getMenuInflater().inflate(R.menu.player_overflow, popupMenu.getMenu());
         popupMenu.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() {
             @Override



More information about the Android mailing list