[Android] Move BG/PiP video option back to main prefs page
Geoffrey Métais
git at videolan.org
Tue Nov 14 11:56:57 CET 2017
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Tue Nov 14 11:05:07 2017 +0100| [6d2d4de4c94f5acd64b54fa0447290db7db4d864] | committer: Geoffrey Métais
Move BG/PiP video option back to main prefs page
> https://code.videolan.org/videolan/vlc-android/commit/6d2d4de4c94f5acd64b54fa0447290db7db4d864
---
vlc-android/res/xml/preferences.xml | 8 ++++++++
vlc-android/res/xml/preferences_video.xml | 7 -------
.../org/videolan/vlc/gui/tv/preferences/PreferencesFragment.java | 4 ++++
.../src/org/videolan/vlc/gui/tv/preferences/PreferencesVideo.java | 1 -
4 files changed, 12 insertions(+), 8 deletions(-)
diff --git a/vlc-android/res/xml/preferences.xml b/vlc-android/res/xml/preferences.xml
index 285894711..4bc7a0a11 100644
--- a/vlc-android/res/xml/preferences.xml
+++ b/vlc-android/res/xml/preferences.xml
@@ -30,6 +30,14 @@
android:entryValues="@array/screen_orientation_values"
android:key="screen_orientation"
android:title="@string/screen_orientation" />
+
+ <ListPreference
+ android:key="video_action_switch"
+ android:defaultValue="0"
+ android:entries="@array/video_app_switch_action_titles"
+ android:entryValues="@array/video_app_switch_action_values"
+ android:summary="@string/video_app_switch_summary"
+ android:title="@string/video_app_switch_title" />
</PreferenceCategory>
<PreferenceCategory android:title="@string/history" >
diff --git a/vlc-android/res/xml/preferences_video.xml b/vlc-android/res/xml/preferences_video.xml
index 6895c92d7..bd7a88e47 100644
--- a/vlc-android/res/xml/preferences_video.xml
+++ b/vlc-android/res/xml/preferences_video.xml
@@ -34,13 +34,6 @@
android:summary="@string/save_audiodelay_summary"
android:title="@string/save_audiodelay_title" />
- <ListPreference
- android:key="video_action_switch"
- android:defaultValue="0"
- android:entries="@array/video_app_switch_action_titles"
- android:entryValues="@array/video_app_switch_action_values"
- android:summary="@string/video_app_switch_summary"
- android:title="@string/video_app_switch_title" />
<PreferenceCategory android:title="@string/controls_prefs_category">
<CheckBoxPreference
android:defaultValue="false"
diff --git a/vlc-android/src/org/videolan/vlc/gui/tv/preferences/PreferencesFragment.java b/vlc-android/src/org/videolan/vlc/gui/tv/preferences/PreferencesFragment.java
index 38c4f3e0a..491de981d 100644
--- a/vlc-android/src/org/videolan/vlc/gui/tv/preferences/PreferencesFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/tv/preferences/PreferencesFragment.java
@@ -33,6 +33,9 @@ import android.widget.Toast;
import org.videolan.vlc.R;
import org.videolan.vlc.VLCApplication;
import org.videolan.vlc.gui.SecondaryActivity;
+import org.videolan.vlc.util.AndroidDevices;
+
+import static org.videolan.vlc.gui.preferences.PreferencesActivity.KEY_VIDEO_APP_SWITCH;
@TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR1)
public class PreferencesFragment extends BasePreferenceFragment {
@@ -61,6 +64,7 @@ public class PreferencesFragment extends BasePreferenceFragment {
super.onCreate(savedInstanceState);
findPreference("screen_orientation").setVisible(false);
findPreference("extensions_category").setVisible(false);
+ findPreference(KEY_VIDEO_APP_SWITCH).setVisible(AndroidDevices.hasPiP);
}
@Override
diff --git a/vlc-android/src/org/videolan/vlc/gui/tv/preferences/PreferencesVideo.java b/vlc-android/src/org/videolan/vlc/gui/tv/preferences/PreferencesVideo.java
index b731568c2..432c2ece1 100644
--- a/vlc-android/src/org/videolan/vlc/gui/tv/preferences/PreferencesVideo.java
+++ b/vlc-android/src/org/videolan/vlc/gui/tv/preferences/PreferencesVideo.java
@@ -54,7 +54,6 @@ public class PreferencesVideo extends BasePreferenceFragment {
findPreference("enable_volume_gesture").setVisible(AndroidDevices.hasTsp);
findPreference("enable_brightness_gesture").setVisible(AndroidDevices.hasTsp);
findPreference("popup_keepscreen").setVisible(false);
- findPreference("video_action_switch").setVisible(AndroidDevices.hasPiP);
}
@Override
More information about the Android
mailing list