Commit a9256ccc authored by Alexandre Perraud's avatar Alexandre Perraud

Preferences : Video reorganization

parent 8c4e8379
......@@ -269,20 +269,11 @@
<string name="interface_prefs_screen">Interface</string>
<string name="interface_gui">Display</string>
<string name="interface_controls">Controls</string>
<string name="interface_secondary_display_category_title">Secondary display</string>
<string name="interface_secondary_display_category_summary">Settings when secondary displays are connected (HDMI/Miracast).</string>
<string name="enable_clone_mode">Prefer clone</string>
<string name="enable_clone_mode_summary">Clone the device screen without remote control.</string>
<string name="interface_other_category">Interface - Other</string>
<string name="enable_brightness_gesture_title">Brightness gesture</string>
<string name="enable_brightness_gesture_summary">Control brightness by gesture during video playback</string>
<string name="enable_volume_gesture_title">Volume gesture</string>
<string name="enable_volume_gesture_summary">Control volume by gesture during video playback</string>
<string name="enable_seek_buttons">Enable seek buttons</string>
<string name="enable_seek_buttons_summary">Show rewind and forward buttons on the video interface</string>
<string name="force_list_portrait">No grid in portrait mode</string>
<string name="force_list_portrait_summary">Show videos in list instead of grid in portrait mode</string>
<string name="audio_title_alignment">Audio title alignment</string>
<string name="enable_headset_detection">Detect headset</string>
<string name="enable_headset_detection_summary">Detect headset insertion and removal</string>
......@@ -296,6 +287,24 @@
<string name="audio_title_alignment_right">Right</string>
<string name="audio_title_alignment_marquee">Marquee</string>
<string name="video_prefs_category">Video</string>
<string name="video_min_group_length_title">Group videos</string>
<string name="video_min_group_length_summary">Videos are grouped if their first letters are the same.</string>
<string name="video_min_group_length_disable">Disable</string>
<string name="video_min_group_length_first">First letter only</string>
<string name="video_min_group_length_short">Short number of letters (6)</string>
<string name="video_min_group_length_long">Long number of letters (9)</string>
<string name="force_list_portrait">No grid in portrait mode</string>
<string name="force_list_portrait_summary">Show videos in list instead of grid in portrait mode</string>
<string name="save_brightness_summary">Remember brightness level in video player</string>
<string name="save_brightness_title">Save brightness level for video</string>
<string name="enable_brightness_gesture_title">Brightness gesture</string>
<string name="enable_brightness_gesture_summary">Control brightness by gesture during video playback</string>
<string name="enable_volume_gesture_title">Volume gesture</string>
<string name="enable_volume_gesture_summary">Control volume by gesture during video playback</string>
<string name="enable_seek_buttons">Enable seek buttons</string>
<string name="enable_seek_buttons_summary">Show rewind and forward buttons on the video interface</string>
<string name="subtitles_prefs_category">Subtitles</string>
<string name="subtitles_size_title">Subtitles Size</string>
<string name="subtitles_size_small">Small</string>
......@@ -310,6 +319,9 @@
<string name="subtitles_color_green">Green</string>
<string name="subtitles_background_title">Subtitles Background</string>
<string name="controls_prefs_category">Controls</string>
<string name="performance_prefs_category">Performance</string>
<string name="chroma_format">Force video chroma</string>
<string name="chroma_format_summary">RGB 32-bit: default chroma\nRGB 16-bit: better performance but lower quality\nYUV: best performance but does not work on all devices. Android 2.3 and later only.</string>
......@@ -394,8 +406,6 @@
<string name="confirm_resume_title">Ask confirmation to resume</string>
<string name="confirm_resume_summary">if activated you will be asked to confirm when a video can be resumed from last position</string>
<string name="directory_empty">Directory is empty</string>
<string name="save_brightness_summary">Remember brightness level in video player</string>
<string name="save_brightness_title">Save brightness level for video</string>
<string name="player_touch_title">Touch controls for Video</string>
<string name="player_touch_enable_all">Enable Touch controls</string>
<string name="player_touch_disable_brightness">Disable brightness control</string>
......@@ -404,12 +414,6 @@
<string name="tv_ui_summary">Change UI to TV adapted theme</string>
<string name="lockscreen_cover_title">Media cover on Lockscreen</string>
<string name="lockscreen_cover_summary">When available, set the current media cover art as lockscreen wallpaper</string>
<string name="video_min_group_length_title">Group videos</string>
<string name="video_min_group_length_summary">Videos are grouped if their first letters are the same.</string>
<string name="video_min_group_length_disable">Disable</string>
<string name="video_min_group_length_first">First letter only</string>
<string name="video_min_group_length_short">Short number of letters (6)</string>
<string name="video_min_group_length_long">Long number of letters (9)</string>
<!--Accessibility-->
<string name="more_actions">More Actions</string>
......
......@@ -38,6 +38,9 @@
<Preference
android:title="@string/interface_prefs_screen"
android:key="ui_category" />
<Preference
android:title="@string/video_prefs_category"
android:key="video_category" />
<Preference
android:title="@string/subtitles_prefs_category"
android:key="subtitles_category" />
......
......@@ -9,14 +9,6 @@
android:key="enable_black_theme"
android:summary="@string/enable_black_theme_summary"
android:title="@string/enable_black_theme" />
<ListPreference
android:defaultValue="6"
android:entries="@array/video_min_group_length_list"
android:entryValues="@array/video_min_group_length_values"
android:key="video_min_group_length"
android:persistent="true"
android:summary="@string/video_min_group_length_summary"
android:title="@string/video_min_group_length_title" />
<PreferenceCategory android:title="@string/interface_gui">
<CheckBoxPreference
......@@ -28,11 +20,6 @@
android:key="lockscreen_cover"
android:summary="@string/lockscreen_cover_summary"
android:title="@string/lockscreen_cover_title" />
<CheckBoxPreference
android:defaultValue="false"
android:key="force_list_portrait"
android:summary="@string/force_list_portrait_summary"
android:title="@string/force_list_portrait" />
<ListPreference
android:defaultValue="0"
android:entries="@array/audio_title_alignment_list"
......@@ -43,31 +30,6 @@
</PreferenceCategory>
<PreferenceCategory android:title="@string/interface_controls">
<CheckBoxPreference
android:defaultValue="false"
android:key="save_brightness"
android:summary="@string/save_brightness_summary"
android:title="@string/save_brightness_title" />
<CheckBoxPreference
android:defaultValue="true"
android:key="enable_volume_gesture"
android:summary="@string/enable_volume_gesture_summary"
android:title="@string/enable_volume_gesture_title" />
<CheckBoxPreference
android:defaultValue="true"
android:key="enable_brightness_gesture"
android:summary="@string/enable_brightness_gesture_summary"
android:title="@string/enable_brightness_gesture_title" />
<CheckBoxPreference
android:defaultValue="false"
android:key="dialog_confirm_resume"
android:summary="@string/confirm_resume_summary"
android:title="@string/confirm_resume_title" />
<CheckBoxPreference
android:defaultValue="false"
android:key="enable_seek_buttons"
android:summary="@string/enable_seek_buttons_summary"
android:title="@string/enable_seek_buttons" />
<CheckBoxPreference
android:defaultValue="true"
android:key="enable_headset_detection"
......
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
android:key="video_category"
android:title="@string/video_prefs_category">
<ListPreference
android:defaultValue="6"
android:entries="@array/video_min_group_length_list"
android:entryValues="@array/video_min_group_length_values"
android:key="video_min_group_length"
android:persistent="true"
android:summary="@string/video_min_group_length_summary"
android:title="@string/video_min_group_length_title" />
<CheckBoxPreference
android:defaultValue="false"
android:key="force_list_portrait"
android:summary="@string/force_list_portrait_summary"
android:title="@string/force_list_portrait" />
<PreferenceCategory android:title="@string/controls_prefs_category">
<CheckBoxPreference
android:defaultValue="false"
android:key="save_brightness"
android:summary="@string/save_brightness_summary"
android:title="@string/save_brightness_title" />
<CheckBoxPreference
android:defaultValue="true"
android:key="enable_volume_gesture"
android:summary="@string/enable_volume_gesture_summary"
android:title="@string/enable_volume_gesture_title" />
<CheckBoxPreference
android:defaultValue="true"
android:key="enable_brightness_gesture"
android:summary="@string/enable_brightness_gesture_summary"
android:title="@string/enable_brightness_gesture_title" />
<CheckBoxPreference
android:defaultValue="false"
android:key="dialog_confirm_resume"
android:summary="@string/confirm_resume_summary"
android:title="@string/confirm_resume_title" />
<CheckBoxPreference
android:defaultValue="false"
android:key="enable_seek_buttons"
android:summary="@string/enable_seek_buttons_summary"
android:title="@string/enable_seek_buttons" />
</PreferenceCategory>
</PreferenceScreen>
......@@ -94,6 +94,9 @@ public class PreferencesFragment extends BasePreferenceFragment implements Share
case "ui_category":
loadFragment(new PreferencesUi());
break;
case "video_category":
loadFragment(new PreferencesVideo());
break;
case "subtitles_category":
loadFragment(new PreferencesSubtitles());
break;
......
......@@ -63,9 +63,6 @@ public class PreferencesUi extends BasePreferenceFragment {
if (preference.getKey() == null)
return false;
switch (preference.getKey()){
case "video_min_group_length":
getActivity().setResult(PreferencesActivity.RESULT_RESTART);
return true;
case "enable_headset_detection":
((PreferencesActivity)getActivity()).detectHeadset(((TwoStatePreference) preference).isChecked());
findPreference("enable_play_on_headset_insertion").setVisible(((TwoStatePreference) preference).isChecked());
......@@ -73,7 +70,6 @@ public class PreferencesUi extends BasePreferenceFragment {
case "enable_steal_remote_control":
PlaybackService.Client.restartService(getActivity());
return true;
case "force_list_portrait":
case "tv_ui":
((PreferencesActivity) getActivity()).setRestart();
return true;
......
/*
* *************************************************************************
* PreferencesVideo.java
* **************************************************************************
* Copyright © 2016 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
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
* ***************************************************************************
*/
package org.videolan.vlc.gui.preferences;
import android.os.Bundle;
import android.support.v7.preference.Preference;
import org.videolan.vlc.R;
public class PreferencesVideo extends BasePreferenceFragment {
@Override
protected int getXml() {
return R.xml.preferences_video;
}
@Override
protected int getTitleId() {
return R.string.video_prefs_category;
}
@Override
public void onStart() {
super.onStart();
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
}
@Override
public boolean onPreferenceTreeClick(Preference preference) {
if (preference.getKey() == null)
return false;
switch (preference.getKey()){
case "video_min_group_length":
getActivity().setResult(PreferencesActivity.RESULT_RESTART);
return true;
case "force_list_portrait":
((PreferencesActivity) getActivity()).setRestart();
return true;
}
return super.onPreferenceTreeClick(preference);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment