[Android] CommonDialogs: segregate audio and video menus

Edward Wang git at videolan.org
Sun Jun 16 05:55:51 CEST 2013


vlc-ports/android | branch: master | Edward Wang <edward.c.wang at compdigitec.com> | Fri Jun 14 08:39:51 2013 -0400| [6b5c4ff2889f899bb1c27be09c06a445a64360e8] | committer: Edward Wang

CommonDialogs: segregate audio and video menus

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

 vlc-android/src/org/videolan/vlc/gui/CommonDialogs.java          |    6 +++++-
 .../src/org/videolan/vlc/gui/audio/AudioPlayerActivity.java      |    3 ++-
 .../src/org/videolan/vlc/gui/video/VideoPlayerActivity.java      |    3 ++-
 3 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/gui/CommonDialogs.java b/vlc-android/src/org/videolan/vlc/gui/CommonDialogs.java
index 1e990bc..dc3e213 100644
--- a/vlc-android/src/org/videolan/vlc/gui/CommonDialogs.java
+++ b/vlc-android/src/org/videolan/vlc/gui/CommonDialogs.java
@@ -44,6 +44,10 @@ import android.widget.LinearLayout;
 public class CommonDialogs {
     public final static String TAG = "VLC/CommonDialogs";
 
+    public static enum MenuType {
+        Video, Audio
+    };
+
     public static AlertDialog deleteMedia(final Context context,
                                           final String addressMedia,
                                           final VlcRunnable runnable) {
@@ -72,7 +76,7 @@ public class CommonDialogs {
         return alertDialog;
     }
 
-    public static void advancedOptions(final Context context, View v) {
+    public static void advancedOptions(final Context context, View v, MenuType t) {
         LayoutInflater inflater = LayoutInflater.from(VLCApplication.getAppContext());
         View view = inflater.inflate(R.layout.advanced_options, null);
 
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 44ae404..1a4e02a 100644
--- a/vlc-android/src/org/videolan/vlc/gui/audio/AudioPlayerActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/audio/AudioPlayerActivity.java
@@ -26,6 +26,7 @@ import org.videolan.vlc.R;
 import org.videolan.vlc.RepeatType;
 import org.videolan.vlc.Util;
 import org.videolan.vlc.gui.CommonDialogs;
+import org.videolan.vlc.gui.CommonDialogs.MenuType;
 import org.videolan.vlc.gui.MainActivity;
 import org.videolan.vlc.interfaces.IAudioPlayer;
 
@@ -325,6 +326,6 @@ public class AudioPlayerActivity extends Activity implements IAudioPlayer {
     }
 
     public void showAdvancedOptions(View v) {
-        CommonDialogs.advancedOptions(this, v);
+        CommonDialogs.advancedOptions(this, v, MenuType.Audio);
     }
 }
diff --git a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
index ef67e6e..87736f6 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
@@ -39,6 +39,7 @@ import org.videolan.vlc.Util;
 import org.videolan.vlc.VLCApplication;
 import org.videolan.vlc.WeakHandler;
 import org.videolan.vlc.gui.CommonDialogs;
+import org.videolan.vlc.gui.CommonDialogs.MenuType;
 import org.videolan.vlc.gui.PreferencesActivity;
 import org.videolan.vlc.gui.audio.AudioPlayerActivity;
 import org.videolan.vlc.interfaces.IPlayerControl;
@@ -1497,6 +1498,6 @@ public class VideoPlayerActivity extends Activity implements IVideoPlayer {
     }
 
     public void showAdvancedOptions(View v) {
-        CommonDialogs.advancedOptions(this, v);
+        CommonDialogs.advancedOptions(this, v, MenuType.Video);
     }
 }



More information about the Android mailing list