[Android] Audio player: allow to open the equalizer from the advanced options menu
Adrien Maglo
git at videolan.org
Thu Jan 30 14:49:18 CET 2014
vlc-ports/android | branch: master | Adrien Maglo <magsoft at videolan.org> | Thu Jan 30 14:49:10 2014 +0100| [2439df360460f3def1362853f486a97a435a970b] | committer: Adrien Maglo
Audio player: allow to open the equalizer from the advanced options menu
> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=2439df360460f3def1362853f486a97a435a970b
---
vlc-android/res/layout/advanced_options.xml | 10 +++++++++-
vlc-android/src/org/videolan/vlc/gui/CommonDialogs.java | 12 ++++++++++--
2 files changed, 19 insertions(+), 3 deletions(-)
diff --git a/vlc-android/res/layout/advanced_options.xml b/vlc-android/res/layout/advanced_options.xml
index cab042c..62d4be9 100644
--- a/vlc-android/res/layout/advanced_options.xml
+++ b/vlc-android/res/layout/advanced_options.xml
@@ -35,7 +35,6 @@
android:layout_height="wrap_content" />
<View
- android:id="@+id/add_subtitle_divider"
android:layout_width="match_parent"
android:layout_height="1px"
android:background="#8FFF"
@@ -49,6 +48,15 @@
android:background="@drawable/background_item"
android:text="@string/subtitle_label"
android:textAppearance="?android:attr/textAppearanceMedium" />
+
+ <TextView
+ android:id="@+id/equalizer"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_margin="10dp"
+ android:background="@drawable/background_item"
+ android:text="@string/equalizer"
+ android:textAppearance="?android:attr/textAppearanceMedium" />
</LinearLayout>
</ScrollView>
\ No newline at end of file
diff --git a/vlc-android/src/org/videolan/vlc/gui/CommonDialogs.java b/vlc-android/src/org/videolan/vlc/gui/CommonDialogs.java
index 49c6bf7..449a73a 100644
--- a/vlc-android/src/org/videolan/vlc/gui/CommonDialogs.java
+++ b/vlc-android/src/org/videolan/vlc/gui/CommonDialogs.java
@@ -112,8 +112,8 @@ public class CommonDialogs {
}
}
- View add_subtitle_divider = view.findViewById(R.id.add_subtitle_divider);
TextView add_subtitle = (TextView)view.findViewById(R.id.add_subtitle);
+ TextView equalizer = (TextView)view.findViewById(R.id.equalizer);
if(t == MenuType.Video) {
add_subtitle.setOnClickListener(new View.OnClickListener() {
@Override
@@ -150,9 +150,17 @@ public class CommonDialogs {
dialog.dismiss();
}
});
+ equalizer.setVisibility(View.GONE);
} else {
+ final MainActivity activity = (MainActivity)context;
+ equalizer.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ activity.showNewFragment("equalizer");
+ dialog.dismiss();
+ }
+ });
add_subtitle.setVisibility(View.GONE);
- add_subtitle_divider.setVisibility(View.GONE);
}
// show dialog
More information about the Android
mailing list