aboutsummaryrefslogtreecommitdiffstats
path: root/java/res
diff options
context:
space:
mode:
authorTadashi G. Takaoka <takaoka@google.com>2012-04-13 16:41:24 +0900
committerTadashi G. Takaoka <takaoka@google.com>2012-04-19 19:33:51 +0900
commitc27fe6253c1d8b3ad3c2f891a48ec5c54d77a3f1 (patch)
tree59cb7776ae6eb07336d54e801bf516ed2d05c7b6 /java/res
parent344af156744c6866090fb70f151efd66668c1e20 (diff)
downloadlatinime-c27fe6253c1d8b3ad3c2f891a48ec5c54d77a3f1.tar.gz
latinime-c27fe6253c1d8b3ad3c2f891a48ec5c54d77a3f1.tar.xz
latinime-c27fe6253c1d8b3ad3c2f891a48ec5c54d77a3f1.zip
Add custom subtype settings
Bug: 4460018 Change-Id: I4919d79516dcf574be2761bbaf9adcdc381b2ddc
Diffstat (limited to 'java/res')
-rw-r--r--java/res/layout/additional_subtype_dialog.xml56
-rw-r--r--java/res/values/strings.xml17
-rw-r--r--java/res/xml/additional_subtype_settings.xml19
-rw-r--r--java/res/xml/prefs.xml4
4 files changed, 96 insertions, 0 deletions
diff --git a/java/res/layout/additional_subtype_dialog.xml b/java/res/layout/additional_subtype_dialog.xml
new file mode 100644
index 000000000..f97c006d6
--- /dev/null
+++ b/java/res/layout/additional_subtype_dialog.xml
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2012, 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.
+*/
+-->
+
+<GridLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:columnCount="2"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:layout_marginLeft="8dip"
+ android:layout_marginRight="8dip"
+ android:padding="8dip">
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="left|center_vertical"
+ style="?android:attr/textAppearanceSmall"
+ android:text="@string/subtype_locale" />
+ <Spinner
+ android:id="@+id/subtype_locale_spinner"
+ android:layout_width="wrap_content"
+ android:layout_marginLeft="8dip"
+ android:layout_marginBottom="8dip"
+ android:layout_marginTop="8dip"
+ android:layout_gravity="fill_horizontal|center_vertical"
+ android:prompt="@string/subtype_locale" />
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="left|center_vertical"
+ style="?android:attr/textAppearanceSmall"
+ android:text="@string/keyboard_layout_set" />
+ <Spinner
+ android:id="@+id/keyboard_layout_set_spinner"
+ android:layout_width="wrap_content"
+ android:layout_marginLeft="8dip"
+ android:layout_marginBottom="8dip"
+ android:layout_marginTop="8dip"
+ android:layout_gravity="fill_horizontal|center_vertical"
+ android:prompt="@string/keyboard_layout_set" />
+</GridLayout>
diff --git a/java/res/values/strings.xml b/java/res/values/strings.xml
index 28acd0fcc..93bd26867 100644
--- a/java/res/values/strings.xml
+++ b/java/res/values/strings.xml
@@ -252,9 +252,26 @@
<string name="subtype_en_GB">English (UK)</string>
<!-- Description for English (United States) keyboard subtype [CHAR LIMIT=22] -->
<string name="subtype_en_US">English (US)</string>
+ <!-- Description for language agnostic keyboard subtype [CHAR LIMIT=22] -->
+ <string name="subtype_no_language">No language</string>
<!-- Description for language agnostic QWERTY keyboard subtype [CHAR LIMIT=22] -->
<string name="subtype_no_language_qwerty">No language (QWERTY)</string>
+ <!-- Title of the preference settings for custom input styles (language and keyboard layout pairs) [CHAR LIMIT=22]-->
+ <string name="custom_input_styles_title">Custom input styles</string>
+ <!-- Title of the option menu to add a new style entry in the preference settings [CHAR_LIMIT=12] -->
+ <string name="add_style">Add style</string>
+ <!-- Title of the button to add custom style entry in the settings dialog [CHAR_LIMIT=12] -->
+ <string name="add">Add</string>
+ <!-- Title of the button to remove a custom style entry in the settings dialog [CHAR_LIMIT=12] -->
+ <string name="remove">Remove</string>
+ <!-- Title of the button to save a custom style entry in the settings dialog [CHAR_LIMIT=12] -->
+ <string name="save">Save</string>
+ <!-- Title of the spinner for choosing a language of custom style in the settings dialog [CHAR_LIMIT=12] -->
+ <string name="subtype_locale">Language</string>
+ <!-- Title of the spinner for choosing a keyboard layout of custom style in the settings dialog [CHAR_LIMIT=12] -->
+ <string name="keyboard_layout_set">Layout</string>
+
<!-- Title of an option for usability study mode -->
<string name="prefs_usability_study_mode">Usability study mode</string>
<!-- Title of the settings for keypress vibration duration -->
diff --git a/java/res/xml/additional_subtype_settings.xml b/java/res/xml/additional_subtype_settings.xml
new file mode 100644
index 000000000..ad280c146
--- /dev/null
+++ b/java/res/xml/additional_subtype_settings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2012 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.
+-->
+
+<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
+ <!-- Items will be added at runtime -->
+</PreferenceScreen>
diff --git a/java/res/xml/prefs.xml b/java/res/xml/prefs.xml
index ab5d44b24..3598a685e 100644
--- a/java/res/xml/prefs.xml
+++ b/java/res/xml/prefs.xml
@@ -100,6 +100,10 @@
android:summary="@string/include_other_imes_in_language_switch_list_summary"
android:persistent="true"
android:defaultValue="false" />
+ <PreferenceScreen
+ android:fragment="com.android.inputmethod.latin.AdditionalSubtypeSettings"
+ android:key="custom_input_styles"
+ android:title="@string/custom_input_styles_title" />
<!-- Values for popup dismiss delay are added programatically -->
<ListPreference
android:key="pref_key_preview_popup_dismiss_delay"