Implement new design for settings of InputMethods
Change-Id: I82392e4a028abe2d588622a7e89fd035966f603a
diff --git a/res/values/donottranslate.xml b/res/values/donottranslate.xml
new file mode 100644
index 0000000..e6bd9a6
--- /dev/null
+++ b/res/values/donottranslate.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2010, The Android Open Source Project
+**
+** 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.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string-array name="input_method_selector_titles">
+ <item>@string/input_method_selector_show_automatically_title</item>
+ <item>@string/input_method_selector_always_show_title</item>
+ <item>@string/input_method_selector_always_hide_title</item>
+ </string-array>
+ <!-- values for input method selector should be corresponding to the array index of titles -->
+ <string name="input_method_selector_show_automatically_value">0</string>
+ <string name="input_method_selector_always_show_value">1</string>
+ <string name="input_method_selector_always_hide_value">2</string>
+ <string name="input_method_selector_visibility_default_value">0</string>
+ <string-array name="input_method_selector_values">
+ <item>@string/input_method_selector_show_automatically_value</item>
+ <item>@string/input_method_selector_always_show_value</item>
+ <item>@string/input_method_selector_always_hide_value</item>
+ </string-array>
+</resources>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index a3a909f..2b7ccb2 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -2254,13 +2254,30 @@
<string name="input_methods_settings_title">Text input</string>
<!-- Setting name for Input Method chooser -->
<string name="input_method">Input method</string>
+ <!-- Title for selecting the current input method -->
+ <string name="current_input_method">Current input method</string>
+ <!-- Title for setting the visibility of input method selector-->
+ <string name="input_method_selector">Input method selector</string>
+ <!-- An option to always show input method selector automatically when needed -->
+ <string name="input_method_selector_show_automatically_title">Automatic</string>
+ <!-- An option to always show input method selector -->
+ <string name="input_method_selector_always_show_title">Always show</string>
+ <!-- An option to always hide input method selector -->
+ <string name="input_method_selector_always_hide_title">Always hide</string>
+ <!-- Title for configuring input method settings -->
+ <string name="configure_input_method">Configure input methods</string>
+ <!-- Title for settings of each IME -->
+ <string name="input_method_settings">Settings</string>
+ <!-- Title for settings of active input methods in each IME -->
+ <string name="active_input_method_subtypes">Active input methods</string>
+
<string name="input_methods_settings_summary">Manage text input options</string>
<!-- Input Methods Settings localized format string for generating the appropriate "Foo settings" menu label for the Input Method named "Foo" -->
<string name="input_methods_settings_label_format"><xliff:g id="ime_name">%1$s</xliff:g> settings</string>
- <!-- The title for the item to manage the settings of enabled the input methods and subtypes. -->
- <string name="input_methods_and_subtype_enabler_title">Manage Input Methods</string>
- <!-- Label for selecting the input methods and subtypes to use -->
- <string name="input_methods_and_subtype_enabler_title_format">Manage input methods in <xliff:g id="ime_application_name">%1$s</xliff:g></string>
+ <!-- Title for the settings of selecting active input methods of an IME -->
+ <string name="input_methods_and_subtype_enabler_title">Select active input methods</string>
+ <!-- Title format for active input methods. "Active input methods in Foo" menu label for the IME named "Foo" -->
+ <string name="input_methods_and_subtype_enabler_title_format">Active input methods in <xliff:g id="ime_application_name">%1$s</xliff:g></string>
<!-- Summary for on-screen keyboard settings -->
<string name="onscreen_keyboard_settings_summary">Onscreen keyboard settings</string>
<!-- Title for built-in keyboard settings -->
diff --git a/res/xml/language_settings.xml b/res/xml/language_settings.xml
index 3afe861..9230496 100644
--- a/res/xml/language_settings.xml
+++ b/res/xml/language_settings.xml
@@ -57,18 +57,20 @@
<PreferenceCategory android:key="keyboard_settings_category"
android:title="@string/keyboard_settings_category">
-
- <PreferenceScreen android:key="input_method"
- android:title="@string/input_method"
+ <PreferenceScreen android:key="current_input_method"
+ android:title="@string/current_input_method"
android:widgetLayout="@*android:layout/preference_dialog" />
+ <ListPreference android:key="input_method_selector"
+ android:title="@string/input_method_selector"
+ android:persistent="true"
+ android:entryValues="@array/input_method_selector_values"
+ android:entries="@array/input_method_selector_titles"
+ android:defaultValue="@string/input_method_selector_visibility_default_value"/>
+
+ <PreferenceScreen android:key="configure_input_method"
+ android:title="@string/configure_input_method">
+ <intent android:action="android.settings.INPUT_METHOD_SETTINGS"/>
+ </PreferenceScreen>
</PreferenceCategory>
-
- <PreferenceScreen
- android:fragment="com.android.settings.PhysicalKeyboardSettings"
- android:key="hardkeyboard_category"
- android:title="@string/builtin_keyboard_settings_title"
- android:summary="@string/builtin_keyboard_settings_summary">
- </PreferenceScreen>
-
</PreferenceScreen>