aboutsummaryrefslogtreecommitdiffstats
path: root/java
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2011-01-19 03:00:43 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2011-01-19 03:00:43 -0800
commit19bca2a227a2ebc6c1399c208ceb1470a4d2ad96 (patch)
tree94c63b8057a54278b2a62dfeed91a49d57b75f33 /java
parent029511cc04fc6c3b7d6657fa728be7ffa8b411e7 (diff)
parentaa4e054dd69ffe597f9e06aa0d6eeb2c30585184 (diff)
downloadlatinime-19bca2a227a2ebc6c1399c208ceb1470a4d2ad96.tar.gz
latinime-19bca2a227a2ebc6c1399c208ceb1470a4d2ad96.tar.xz
latinime-19bca2a227a2ebc6c1399c208ceb1470a4d2ad96.zip
am aa4e054d: am ce9c4171: Change separator titles in settings screen.
* commit 'aa4e054dd69ffe597f9e06aa0d6eeb2c30585184': Change separator titles in settings screen.
Diffstat (limited to 'java')
-rw-r--r--java/res/values/strings.xml7
-rw-r--r--java/res/xml/prefs.xml108
-rw-r--r--java/src/com/android/inputmethod/latin/Settings.java17
3 files changed, 72 insertions, 60 deletions
diff --git a/java/res/values/strings.xml b/java/res/values/strings.xml
index 6f0f2fb72..2d0797d49 100644
--- a/java/res/values/strings.xml
+++ b/java/res/values/strings.xml
@@ -34,8 +34,11 @@
<!-- Option to control whether or not to show a popup with a larger font on each key press. -->
<string name="popup_on_keypress">Popup on keypress</string>
+ <!-- Category title for general settings for Android keyboard -->
+ <string name="general_category">General</string>
+
<!-- Category title for text prediction -->
- <string name="prediction_category">Word suggestion settings</string>
+ <string name="prediction_category">Text correction</string>
<!-- Option to enable auto capitalization of sentences -->
<string name="auto_cap">Auto-capitalization</string>
@@ -46,7 +49,7 @@
<string name="quick_fixes_summary">Corrects commonly typed mistakes</string>
<!-- Option to enable showing suggestions -->
- <string name="prefs_show_suggestions">Show suggestions</string>
+ <string name="prefs_show_suggestions">Show correction suggestions</string>
<!-- Description for show suggestions -->
<string name="prefs_show_suggestions_summary">Display suggested words while typing</string>
<string name="prefs_suggestion_visibility_show_name">Always show</string>
diff --git a/java/res/xml/prefs.xml b/java/res/xml/prefs.xml
index 4bcb1d7d8..02918858b 100644
--- a/java/res/xml/prefs.xml
+++ b/java/res/xml/prefs.xml
@@ -4,9 +4,9 @@
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-
+
http://www.apache.org/licenses/LICENSE-2.0
-
+
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -18,62 +18,68 @@
android:title="@string/english_ime_settings"
android:key="english_ime_settings">
- <CheckBoxPreference
- android:key="auto_cap"
- android:title="@string/auto_cap"
- android:persistent="true"
- android:defaultValue="true"
- />
+ <PreferenceCategory
+ android:title="@string/general_category"
+ android:key="general_settings">
- <CheckBoxPreference
- android:key="vibrate_on"
- android:title="@string/vibrate_on_keypress"
- android:persistent="true"
- />
+ <CheckBoxPreference
+ android:key="auto_cap"
+ android:title="@string/auto_cap"
+ android:persistent="true"
+ android:defaultValue="true"
+ />
- <CheckBoxPreference
- android:key="sound_on"
- android:title="@string/sound_on_keypress"
- android:persistent="true"
- />
+ <CheckBoxPreference
+ android:key="vibrate_on"
+ android:title="@string/vibrate_on_keypress"
+ android:persistent="true"
+ />
- <CheckBoxPreference
- android:key="popup_on"
- android:title="@string/popup_on_keypress"
- android:persistent="true"
- android:defaultValue="@bool/config_default_popup_preview"
- />
+ <CheckBoxPreference
+ android:key="sound_on"
+ android:title="@string/sound_on_keypress"
+ android:persistent="true"
+ />
- <CheckBoxPreference
- android:key="recorrection_enabled"
- android:title="@string/prefs_enable_recorrection"
- android:summary="@string/prefs_enable_recorrection_summary"
- android:persistent="true"
- android:defaultValue="@bool/default_recorrection_enabled"
- />
+ <CheckBoxPreference
+ android:key="popup_on"
+ android:title="@string/popup_on_keypress"
+ android:persistent="true"
+ android:defaultValue="@bool/config_default_popup_preview"
+ />
- <ListPreference
- android:key="settings_key"
- android:title="@string/prefs_settings_key"
- android:persistent="true"
- android:entryValues="@array/settings_key_modes_values"
- android:entries="@array/settings_key_modes"
- android:defaultValue="@string/settings_key_mode_auto"
- />
+ <CheckBoxPreference
+ android:key="recorrection_enabled"
+ android:title="@string/prefs_enable_recorrection"
+ android:summary="@string/prefs_enable_recorrection_summary"
+ android:persistent="true"
+ android:defaultValue="@bool/default_recorrection_enabled"
+ />
- <ListPreference
- android:key="voice_mode"
- android:title="@string/voice_input"
- android:persistent="true"
- android:entryValues="@array/voice_input_modes_values"
- android:entries="@array/voice_input_modes"
- android:defaultValue="@string/voice_mode_main"
- />
+ <ListPreference
+ android:key="settings_key"
+ android:title="@string/prefs_settings_key"
+ android:persistent="true"
+ android:entryValues="@array/settings_key_modes_values"
+ android:entries="@array/settings_key_modes"
+ android:defaultValue="@string/settings_key_mode_auto"
+ />
- <PreferenceScreen
- android:key="subtype_settings"
- android:title="@string/language_selection_title"
- android:summary="@string/language_selection_summary" />
+ <ListPreference
+ android:key="voice_mode"
+ android:title="@string/voice_input"
+ android:persistent="true"
+ android:entryValues="@array/voice_input_modes_values"
+ android:entries="@array/voice_input_modes"
+ android:defaultValue="@string/voice_mode_main"
+ />
+
+ <PreferenceScreen
+ android:key="subtype_settings"
+ android:title="@string/language_selection_title"
+ android:summary="@string/language_selection_summary" />
+
+ </PreferenceCategory>
<PreferenceCategory
android:title="@string/prediction_category"
diff --git a/java/src/com/android/inputmethod/latin/Settings.java b/java/src/com/android/inputmethod/latin/Settings.java
index 75ebbe7e5..1b802d4ab 100644
--- a/java/src/com/android/inputmethod/latin/Settings.java
+++ b/java/src/com/android/inputmethod/latin/Settings.java
@@ -48,6 +48,7 @@ public class Settings extends PreferenceActivity
DialogInterface.OnDismissListener, OnPreferenceClickListener {
private static final String TAG = "Settings";
+ public static final String PREF_GENERAL_SETTINGS_KEY = "general_settings";
public static final String PREF_VIBRATE_ON = "vibrate_on";
public static final String PREF_SOUND_ON = "sound_on";
public static final String PREF_POPUP_ON = "popup_on";
@@ -111,40 +112,42 @@ public class Settings extends PreferenceActivity
mBigramSuggestion = (CheckBoxPreference) findPreference(PREF_BIGRAM_SUGGESTIONS);
ensureConsistencyOfAutoCorrectionSettings();
+ final PreferenceGroup generalSettings =
+ (PreferenceGroup) findPreference(PREF_GENERAL_SETTINGS_KEY);
+
final boolean showSettingsKeyOption = getResources().getBoolean(
R.bool.config_enable_show_settings_key_option);
if (!showSettingsKeyOption) {
- getPreferenceScreen().removePreference(mSettingsKeyPreference);
+ generalSettings.removePreference(mSettingsKeyPreference);
}
final boolean showVoiceKeyOption = getResources().getBoolean(
R.bool.config_enable_show_voice_key_option);
if (!showVoiceKeyOption) {
- getPreferenceScreen().removePreference(mVoicePreference);
+ generalSettings.removePreference(mVoicePreference);
}
Vibrator vibrator = (Vibrator) getSystemService(VIBRATOR_SERVICE);
if (vibrator == null || !vibrator.hasVibrator()) {
- getPreferenceScreen().removePreference(
- getPreferenceScreen().findPreference(PREF_VIBRATE_ON));
+ generalSettings.removePreference(findPreference(PREF_VIBRATE_ON));
}
final boolean showSubtypeSettings = getResources().getBoolean(
R.bool.config_enable_show_subtype_settings);
if (!showSubtypeSettings) {
- getPreferenceScreen().removePreference(findPreference(PREF_SUBTYPES));
+ generalSettings.removePreference(findPreference(PREF_SUBTYPES));
}
final boolean showPopupOption = getResources().getBoolean(
R.bool.config_enable_show_popup_on_keypress_option);
if (!showPopupOption) {
- getPreferenceScreen().removePreference(findPreference(PREF_POPUP_ON));
+ generalSettings.removePreference(findPreference(PREF_POPUP_ON));
}
final boolean showRecorrectionOption = getResources().getBoolean(
R.bool.config_enable_show_recorrection_option);
if (!showRecorrectionOption) {
- getPreferenceScreen().removePreference(findPreference(PREF_RECORRECTION_ENABLED));
+ generalSettings.removePreference(findPreference(PREF_RECORRECTION_ENABLED));
}
}