diff options
author | Michael Weghorn <m.weghorn@posteo.de> | 2020-03-06 11:20:00 +0100 |
---|---|---|
committer | Michael Weghorn <m.weghorn@posteo.de> | 2020-03-06 16:48:26 +0100 |
commit | 3e19e0ddaa0221fac93d00798613f5938eae7a7b (patch) | |
tree | 1723c625126c2c73e2bbf40e8be8cbf9cad12114 /android/source | |
parent | adbc858dd476651ac79300aaae25cf82e848cb69 (diff) |
android: Move "Display language" setting to "General" section
This fits better than the "File Explorer Settings" one.
The whole "General" section was hidden before when editing
mode was disabled for the build ('!BuildConfig.ALLOW_EDITING').
Since the language setting is unrelated to this, no longer
do so, but explicitly remove the two other entries in this group,
namely "ENABLE_DEVELOPER" and "ENABLE_EXPERIMENTAL".
Change-Id: I64d1abef38d7669fc1072b380f497ca83e23f265
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90096
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Diffstat (limited to 'android/source')
-rw-r--r-- | android/source/res/xml/libreoffice_preferences.xml | 19 | ||||
-rw-r--r-- | android/source/src/java/org/libreoffice/SettingsActivity.java | 5 |
2 files changed, 14 insertions, 10 deletions
diff --git a/android/source/res/xml/libreoffice_preferences.xml b/android/source/res/xml/libreoffice_preferences.xml index d02c9d5cccbc..d418dd559f86 100644 --- a/android/source/res/xml/libreoffice_preferences.xml +++ b/android/source/res/xml/libreoffice_preferences.xml @@ -25,15 +25,6 @@ android:key="EXPLORER_VIEW_TYPE" android:summary="@string/pref_viewmode_summary" /> - <ListPreference - android:title="@string/display_language" - android:summary="@string/display_language_summary" - android:entries="@array/SupportedLanguages" - android:entryValues="@array/SupportedLanguagesValues" - android:defaultValue="SYSTEM_DEFAULT_LANGUAGE" - android:key="DISPLAY_LANGUAGE" - /> - <CheckBoxPreference android:title="@string/pref_show_hidden_files" android:key="ENABLE_SHOW_HIDDEN_FILES" @@ -43,6 +34,16 @@ <PreferenceCategory android:title="@string/pref_category_general" android:key="PREF_CATEGORY_GENERAL"> + + <ListPreference + android:title="@string/display_language" + android:summary="@string/display_language_summary" + android:entries="@array/SupportedLanguages" + android:entryValues="@array/SupportedLanguagesValues" + android:defaultValue="SYSTEM_DEFAULT_LANGUAGE" + android:key="DISPLAY_LANGUAGE" + /> + <CheckBoxPreference android:title="@string/pref_experimental_editing" android:key="ENABLE_EXPERIMENTAL" diff --git a/android/source/src/java/org/libreoffice/SettingsActivity.java b/android/source/src/java/org/libreoffice/SettingsActivity.java index 73ada55b9380..5623abc2e597 100644 --- a/android/source/src/java/org/libreoffice/SettingsActivity.java +++ b/android/source/src/java/org/libreoffice/SettingsActivity.java @@ -12,6 +12,7 @@ import android.app.Activity; import android.content.SharedPreferences; import android.os.Bundle; import android.preference.PreferenceFragment; +import android.preference.PreferenceGroup; public class SettingsActivity extends Activity { @Override @@ -30,7 +31,9 @@ public class SettingsActivity extends Activity { super.onCreate(savedInstanceState); addPreferencesFromResource(R.xml.libreoffice_preferences); if(!BuildConfig.ALLOW_EDITING) { - getPreferenceScreen().removePreference(findPreference("PREF_CATEGORY_GENERAL")); + PreferenceGroup generalGroup = (PreferenceGroup) findPreference("PREF_CATEGORY_GENERAL"); + generalGroup.removePreference(generalGroup.findPreference("ENABLE_EXPERIMENTAL")); + generalGroup.removePreference(generalGroup.findPreference("ENABLE_DEVELOPER")); } } |