Added an Input Method selector in Language settings
Bug: 2132207 - Settings UI has no way to change IME
This commit is contained in:
@@ -1905,6 +1905,8 @@ found in the list of installed applications.</string>
|
||||
|
||||
<!-- Input methods Settings -->
|
||||
<string name="input_methods_settings_title">Text input</string>
|
||||
<!-- Setting name for Input Method chooser -->
|
||||
<string name="input_method">Input method</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>
|
||||
|
@@ -26,7 +26,13 @@
|
||||
</PreferenceScreen>
|
||||
|
||||
<PreferenceCategory android:key="text_category"
|
||||
android:title="@string/text_category" />
|
||||
android:title="@string/text_category">
|
||||
|
||||
<PreferenceScreen android:key="input_method"
|
||||
android:title="@string/input_method"
|
||||
android:widgetLayout="@*android:layout/preference_dialog" />
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceScreen
|
||||
android:key="hardkeyboard_category"
|
||||
|
@@ -44,6 +44,8 @@ import java.util.List;
|
||||
public class LanguageSettings extends PreferenceActivity {
|
||||
|
||||
private static final String KEY_PHONE_LANGUAGE = "phone_language";
|
||||
private static final String KEY_INPUT_METHOD = "input_method";
|
||||
|
||||
private boolean mHaveHardKeyboard;
|
||||
|
||||
private List<InputMethodInfo> mInputMethodProperties;
|
||||
@@ -282,7 +284,10 @@ public class LanguageSettings extends PreferenceActivity {
|
||||
mLastTickedInputMethodId = null;
|
||||
}
|
||||
} else if (preference instanceof PreferenceScreen) {
|
||||
if (preference.getIntent() == null) {
|
||||
if (KEY_INPUT_METHOD.equals(preference.getKey())) {
|
||||
InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
|
||||
imm.showInputMethodPicker();
|
||||
} else if (preference.getIntent() == null) {
|
||||
PreferenceScreen pref = (PreferenceScreen) preference;
|
||||
String activityName = pref.getKey();
|
||||
String packageName = activityName.substring(0, activityName
|
||||
|
Reference in New Issue
Block a user