aboutsummaryrefslogtreecommitdiffstats
path: root/java
diff options
context:
space:
mode:
Diffstat (limited to 'java')
-rw-r--r--java/res/values-xlarge/bools.xml23
-rw-r--r--java/res/values-xlarge/dimens.xml26
-rw-r--r--java/res/values/strings.xml2
-rw-r--r--java/res/xml/method.xml111
-rw-r--r--java/res/xml/prefs.xml9
-rw-r--r--java/src/com/android/inputmethod/latin/LatinIME.java8
6 files changed, 171 insertions, 8 deletions
diff --git a/java/res/values-xlarge/bools.xml b/java/res/values-xlarge/bools.xml
new file mode 100644
index 000000000..fe8fc5838
--- /dev/null
+++ b/java/res/values-xlarge/bools.xml
@@ -0,0 +1,23 @@
+<?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>
+ <!-- Whether or not Popup on key press is enabled by default -->
+ <bool name="default_popup_preview">false</bool>
+</resources>
diff --git a/java/res/values-xlarge/dimens.xml b/java/res/values-xlarge/dimens.xml
new file mode 100644
index 000000000..4e1c52877
--- /dev/null
+++ b/java/res/values-xlarge/dimens.xml
@@ -0,0 +1,26 @@
+<?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>
+ <dimen name="key_height">72dip</dimen>
+ <dimen name="candidate_strip_height">46dip</dimen>
+ <dimen name="spacebar_vertical_correction">0dip</dimen>
+ <dimen name="key_text_size">35sp</dimen>
+</resources>
diff --git a/java/res/values/strings.xml b/java/res/values/strings.xml
index ef5127e9d..6757dc275 100644
--- a/java/res/values/strings.xml
+++ b/java/res/values/strings.xml
@@ -29,7 +29,7 @@
<!-- Option to play back sound on keypress in soft keyboard -->
<string name="sound_on_keypress">Sound on keypress</string>
- <!-- Option to pop up the character with a larger font above soft keyboard -->
+ <!-- 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>
<!-- Option to enable using nearby keys when correcting/predicting -->
diff --git a/java/res/xml/method.xml b/java/res/xml/method.xml
index e5654e96d..fab4bd72b 100644
--- a/java/res/xml/method.xml
+++ b/java/res/xml/method.xml
@@ -20,7 +20,114 @@
<!-- The attributes in this XML file provide configuration information -->
<!-- for the Input Method Manager. -->
+<!-- cs, da, de, en, es, fr, it, iw, nb, nl, ru, sr, sv -->
+<!-- TODO: use <lang>_keyboard icon instead of a common keyboard icon. -->
+<!-- TODO: use <lang>_mic icon instead of a common mic icon. -->
<input-method xmlns:android="http://schemas.android.com/apk/res/android"
android:settingsActivity="com.android.inputmethod.latin.LatinIMESettings"
- android:isDefault="@bool/im_is_default"
-/>
+ android:isDefault="@bool/im_is_default">
+ <subtype android:icon="@drawable/ic_subtype_keyboard"
+ android:imeSubtypeLocale="cs"
+ android:imeSubtypeMode="@string/subtype_mode_keyboard"
+ />
+ <subtype android:icon="@drawable/ic_subtype_keyboard"
+ android:imeSubtypeLocale="da"
+ android:imeSubtypeMode="@string/subtype_mode_keyboard"
+ />
+ <subtype android:icon="@drawable/ic_subtype_keyboard"
+ android:imeSubtypeLocale="de"
+ android:imeSubtypeMode="@string/subtype_mode_keyboard"
+ />
+ <subtype android:icon="@drawable/ic_subtype_keyboard"
+ android:imeSubtypeLocale="en"
+ android:imeSubtypeMode="@string/subtype_mode_keyboard"
+ />
+ <subtype android:icon="@drawable/ic_subtype_keyboard"
+ android:imeSubtypeLocale="es"
+ android:imeSubtypeMode="@string/subtype_mode_keyboard"
+ />
+ <subtype android:icon="@drawable/ic_subtype_keyboard"
+ android:imeSubtypeLocale="fr"
+ android:imeSubtypeMode="@string/subtype_mode_keyboard"
+ />
+ <subtype android:icon="@drawable/ic_subtype_keyboard"
+ android:imeSubtypeLocale="it"
+ android:imeSubtypeMode="@string/subtype_mode_keyboard"
+ />
+ <subtype android:icon="@drawable/ic_subtype_keyboard"
+ android:imeSubtypeLocale="iw"
+ android:imeSubtypeMode="@string/subtype_mode_keyboard"
+ />
+ <subtype android:icon="@drawable/ic_subtype_keyboard"
+ android:imeSubtypeLocale="nb"
+ android:imeSubtypeMode="@string/subtype_mode_keyboard"
+ />
+ <subtype android:icon="@drawable/ic_subtype_keyboard"
+ android:imeSubtypeLocale="nl"
+ android:imeSubtypeMode="@string/subtype_mode_keyboard"
+ />
+ <subtype android:icon="@drawable/ic_subtype_keyboard"
+ android:imeSubtypeLocale="ru"
+ android:imeSubtypeMode="@string/subtype_mode_keyboard"
+ />
+ <subtype android:icon="@drawable/ic_subtype_keyboard"
+ android:imeSubtypeLocale="sr"
+ android:imeSubtypeMode="@string/subtype_mode_keyboard"
+ />
+ <subtype android:icon="@drawable/ic_subtype_keyboard"
+ android:imeSubtypeLocale="sv"
+ android:imeSubtypeMode="@string/subtype_mode_keyboard"
+ />
+ <subtype android:icon="@drawable/ic_subtype_mic"
+ android:imeSubtypeLocale="cs"
+ android:imeSubtypeMode="@string/subtype_mode_voice"
+ />
+ <subtype android:icon="@drawable/ic_subtype_mic"
+ android:imeSubtypeLocale="da"
+ android:imeSubtypeMode="@string/subtype_mode_voice"
+ />
+ <subtype android:icon="@drawable/ic_subtype_mic"
+ android:imeSubtypeLocale="de"
+ android:imeSubtypeMode="@string/subtype_mode_voice"
+ />
+ <subtype android:icon="@drawable/ic_subtype_mic"
+ android:imeSubtypeLocale="en"
+ android:imeSubtypeMode="@string/subtype_mode_voice"
+ />
+ <subtype android:icon="@drawable/ic_subtype_mic"
+ android:imeSubtypeLocale="es"
+ android:imeSubtypeMode="@string/subtype_mode_voice"
+ />
+ <subtype android:icon="@drawable/ic_subtype_mic"
+ android:imeSubtypeLocale="fr"
+ android:imeSubtypeMode="@string/subtype_mode_voice"
+ />
+ <subtype android:icon="@drawable/ic_subtype_mic"
+ android:imeSubtypeLocale="it"
+ android:imeSubtypeMode="@string/subtype_mode_voice"
+ />
+ <subtype android:icon="@drawable/ic_subtype_mic"
+ android:imeSubtypeLocale="iw"
+ android:imeSubtypeMode="@string/subtype_mode_voice"
+ />
+ <subtype android:icon="@drawable/ic_subtype_mic"
+ android:imeSubtypeLocale="nb"
+ android:imeSubtypeMode="@string/subtype_mode_voice"
+ />
+ <subtype android:icon="@drawable/ic_subtype_mic"
+ android:imeSubtypeLocale="nl"
+ android:imeSubtypeMode="@string/subtype_mode_voice"
+ />
+ <subtype android:icon="@drawable/ic_subtype_mic"
+ android:imeSubtypeLocale="ru"
+ android:imeSubtypeMode="@string/subtype_mode_voice"
+ />
+ <subtype android:icon="@drawable/ic_subtype_mic"
+ android:imeSubtypeLocale="sr"
+ android:imeSubtypeMode="@string/subtype_mode_voice"
+ />
+ <subtype android:icon="@drawable/ic_subtype_mic"
+ android:imeSubtypeLocale="sv"
+ android:imeSubtypeMode="@string/subtype_mode_voice"
+ />
+</input-method>
diff --git a/java/res/xml/prefs.xml b/java/res/xml/prefs.xml
index c4ffeefce..a52d43cd5 100644
--- a/java/res/xml/prefs.xml
+++ b/java/res/xml/prefs.xml
@@ -105,6 +105,15 @@
android:defaultValue="@bool/enable_autocorrect"
android:dependency="show_suggestions"
/>
+
+ <CheckBoxPreference
+ android:key="bigram_suggestion"
+ android:title="@string/bigram_suggestion"
+ android:summary="@string/bigram_suggestion_summary"
+ android:persistent="true"
+ android:defaultValue="true"
+ android:dependency="auto_complete"
+ />
</PreferenceCategory>
</PreferenceScreen>
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index f26cbc059..37ae43d38 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -94,7 +94,7 @@ public class LatinIME extends InputMethodService
private static final String PREF_QUICK_FIXES = "quick_fixes";
private static final String PREF_SHOW_SUGGESTIONS = "show_suggestions";
private static final String PREF_AUTO_COMPLETE = "auto_complete";
- //private static final String PREF_BIGRAM_SUGGESTIONS = "bigram_suggestion";
+ private static final String PREF_BIGRAM_SUGGESTIONS = "bigram_suggestion";
private static final String PREF_VOICE_MODE = "voice_mode";
// Whether or not the user has used voice input before (and thus, whether to show the
@@ -193,8 +193,7 @@ public class LatinIME extends InputMethodService
private boolean mAutoSpace;
private boolean mJustAddedAutoSpace;
private boolean mAutoCorrectEnabled;
- // Bigram Suggestion is disabled in this version.
- private final boolean mBigramSuggestionEnabled = false;
+ private boolean mBigramSuggestionEnabled;
private boolean mAutoCorrectOn;
// TODO move this state variable outside LatinIME
private boolean mCapsLock;
@@ -2357,8 +2356,7 @@ public class LatinIME extends InputMethodService
}
mAutoCorrectEnabled = sp.getBoolean(PREF_AUTO_COMPLETE,
mResources.getBoolean(R.bool.enable_autocorrect)) & mShowSuggestions;
- //mBigramSuggestionEnabled = sp.getBoolean(
- // PREF_BIGRAM_SUGGESTIONS, true) & mShowSuggestions;
+ mBigramSuggestionEnabled = sp.getBoolean(PREF_BIGRAM_SUGGESTIONS, true) & mShowSuggestions;
updateCorrectionMode();
updateAutoTextEnabled(mResources.getConfiguration().locale);
mLanguageSwitcher.loadLocales(sp);