main
Budi Kusmiantoro 2014-09-15 17:53:23 +00:00 committed by Android Git Automerger
commit 106706ced9
51 changed files with 242 additions and 148 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 774 B

After

Width:  |  Height:  |  Size: 937 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 714 B

After

Width:  |  Height:  |  Size: 901 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1020 B

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 974 B

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 517 B

After

Width:  |  Height:  |  Size: 580 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 494 B

After

Width:  |  Height:  |  Size: 553 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 658 B

After

Width:  |  Height:  |  Size: 716 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 643 B

After

Width:  |  Height:  |  Size: 709 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 943 B

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

View File

@ -40,16 +40,22 @@
<!-- config_more_keys_keyboard_key_height x -0.5 -->
<dimen name="config_more_keys_keyboard_vertical_correction_holo">-22.4dp</dimen>
<dimen name="config_key_preview_offset_holo">1.6dp</dimen>
<dimen name="config_key_preview_height_holo">80dp</dimen>
<dimen name="config_key_preview_offset_lxx">43.6dp</dimen>
<dimen name="config_key_preview_height_lxx">122dp</dimen>
<fraction name="config_key_preview_text_ratio">90%</fraction>
<fraction name="config_key_letter_ratio">65%</fraction>
<fraction name="config_key_letter_ratio_holo">65%</fraction>
<fraction name="config_key_letter_ratio_lxx">65%</fraction>
<fraction name="config_key_large_letter_ratio_holo">74%</fraction>
<fraction name="config_key_large_letter_ratio_lxx">90%</fraction>
<fraction name="config_key_label_ratio">40%</fraction>
<fraction name="config_key_hint_letter_ratio">30%</fraction>
<fraction name="config_key_label_ratio_holo">40%</fraction>
<fraction name="config_key_label_ratio_lxx">40%</fraction>
<fraction name="config_key_hint_letter_ratio_holo">30%</fraction>
<fraction name="config_key_hint_letter_ratio_lxx">30%</fraction>
<fraction name="config_key_hint_label_ratio_holo">52%</fraction>
<fraction name="config_key_hint_label_ratio_lxx">30%</fraction>
<fraction name="config_key_shifted_letter_hint_ratio">40%</fraction>
<fraction name="config_key_shifted_letter_hint_ratio_holo">40%</fraction>
<fraction name="config_key_shifted_letter_hint_ratio_lxx">40%</fraction>
<fraction name="config_language_on_spacebar_text_ratio">40.000%</fraction>
<!-- For 5-row keyboard -->

View File

@ -33,5 +33,7 @@
<!-- Preferable keyboard height in absolute scale: 45.0mm -->
<!-- Xoom -->
<item>HARDWARE=stingray,265.4378</item>
<!-- Volantis -->
<item>HARDWARE=flounder,272.0</item>
</string-array>
</resources>

View File

@ -23,7 +23,7 @@
<!-- Preferable keyboard height in absolute scale: 45.0mm -->
<!-- This config_default_keyboard_height value should match with keyboard-heights.xml -->
<dimen name="config_default_keyboard_height">283.5dp</dimen>
<fraction name="config_min_keyboard_height">45%p</fraction>
<fraction name="config_min_keyboard_height">40%p</fraction>
<dimen name="config_more_keys_keyboard_key_height">81.9dp</dimen>
@ -32,14 +32,18 @@
<fraction name="config_key_vertical_gap_holo">4.5%p</fraction>
<fraction name="config_key_horizontal_gap_holo">0.9%p</fraction>
<fraction name="config_key_letter_ratio">50%</fraction>
<fraction name="config_key_letter_ratio_holo">50%</fraction>
<fraction name="config_key_letter_ratio_lxx">50%</fraction>
<fraction name="config_key_large_letter_ratio_holo">48%</fraction>
<fraction name="config_key_large_letter_ratio_lxx">60%</fraction>
<fraction name="config_key_label_ratio">32%</fraction>
<fraction name="config_key_hint_letter_ratio">23%</fraction>
<fraction name="config_key_label_ratio_holo">32%</fraction>
<fraction name="config_key_label_ratio_lxx">32%</fraction>
<fraction name="config_key_hint_letter_ratio_holo">23%</fraction>
<fraction name="config_key_hint_letter_ratio_lxx">23%</fraction>
<fraction name="config_key_hint_label_ratio_holo">34%</fraction>
<fraction name="config_key_hint_label_ratio_lxx">20%</fraction>
<fraction name="config_key_shifted_letter_hint_ratio">29%</fraction>
<fraction name="config_key_shifted_letter_hint_ratio_holo">29%</fraction>
<fraction name="config_key_shifted_letter_hint_ratio_lxx">29%</fraction>
<fraction name="config_language_on_spacebar_text_ratio">30.0%</fraction>
<dimen name="config_key_shifted_letter_hint_padding">4dp</dimen>

View File

@ -40,18 +40,20 @@
<fraction name="config_key_horizontal_gap_holo">1.565%p</fraction>
<!-- config_more_keys_keyboard_key_height x -0.5 -->
<dimen name="config_more_keys_keyboard_vertical_correction_holo">-31.5dp</dimen>
<dimen name="config_key_preview_offset_holo">8.0dp</dimen>
<dimen name="config_key_preview_height">94.5dp</dimen>
<fraction name="config_key_preview_text_ratio">50%</fraction>
<fraction name="config_key_letter_ratio">42%</fraction>
<fraction name="config_key_letter_ratio_holo">42%</fraction>
<fraction name="config_key_letter_ratio_lxx">50%</fraction>
<fraction name="config_key_large_letter_ratio_holo">45%</fraction>
<fraction name="config_key_large_letter_ratio_lxx">60%</fraction>
<fraction name="config_key_label_ratio">25%</fraction>
<fraction name="config_key_hint_letter_ratio">23%</fraction>
<fraction name="config_key_label_ratio_holo">25%</fraction>
<fraction name="config_key_label_ratio_lxx">32%</fraction>
<fraction name="config_key_hint_letter_ratio_holo">23%</fraction>
<fraction name="config_key_hint_letter_ratio_lxx">23%</fraction>
<fraction name="config_key_hint_label_ratio_holo">28%</fraction>
<fraction name="config_key_hint_label_ratio_lxx">20%</fraction>
<fraction name="config_key_shifted_letter_hint_ratio">22%</fraction>
<fraction name="config_key_shifted_letter_hint_ratio_holo">22%</fraction>
<fraction name="config_key_shifted_letter_hint_ratio_lxx">22%</fraction>
<fraction name="config_language_on_spacebar_text_ratio">28.0%</fraction>
<dimen name="config_key_hint_letter_padding">3dp</dimen>
<dimen name="config_key_shifted_letter_hint_padding">3dp</dimen>

View File

@ -23,25 +23,27 @@
<!-- Preferable keyboard height in absolute scale: 58.0mm -->
<!-- This config_default_keyboard_height value should match with keyboard-heights.xml -->
<dimen name="config_default_keyboard_height">365.4dp</dimen>
<fraction name="config_min_keyboard_height">45%p</fraction>
<fraction name="config_min_keyboard_height">35%p</fraction>
<fraction name="config_keyboard_top_padding_holo">1.896%p</fraction>
<fraction name="config_keyboard_bottom_padding_holo">0.0%p</fraction>
<fraction name="config_key_vertical_gap_holo">3.690%p</fraction>
<fraction name="config_key_horizontal_gap_holo">1.030%p</fraction>
<dimen name="config_key_preview_offset_holo">8.0dp</dimen>
<dimen name="config_more_keys_keyboard_key_height">81.9dp</dimen>
<dimen name="config_key_preview_height">107.1dp</dimen>
<fraction name="config_key_letter_ratio">43%</fraction>
<fraction name="config_key_letter_ratio_holo">43%</fraction>
<fraction name="config_key_letter_ratio_lxx">50%</fraction>
<fraction name="config_key_large_letter_ratio_holo">42%</fraction>
<fraction name="config_key_large_letter_ratio_lxx">60%</fraction>
<fraction name="config_key_label_ratio">28%</fraction>
<fraction name="config_key_hint_letter_ratio">23%</fraction>
<fraction name="config_key_label_ratio_holo">28%</fraction>
<fraction name="config_key_label_ratio_lxx">32%</fraction>
<fraction name="config_key_hint_letter_ratio_holo">23%</fraction>
<fraction name="config_key_hint_letter_ratio_lxx">23%</fraction>
<fraction name="config_key_hint_label_ratio_holo">28%</fraction>
<fraction name="config_key_hint_label_ratio_lxx">20%</fraction>
<fraction name="config_key_shifted_letter_hint_ratio">24%</fraction>
<fraction name="config_key_shifted_letter_hint_ratio_holo">24%</fraction>
<fraction name="config_key_shifted_letter_hint_ratio_lxx">24%</fraction>
<fraction name="config_language_on_spacebar_text_ratio">24.00%</fraction>
<!-- For 5-row keyboard -->

View File

@ -32,7 +32,6 @@
<fraction name="config_key_horizontal_gap_holo">1.066%p</fraction>
<!-- config_more_keys_keyboard_key_height x -0.5 -->
<dimen name="config_more_keys_keyboard_vertical_correction_holo">-31.5dp</dimen>
<dimen name="config_key_preview_offset_holo">8.0dp</dimen>
<dimen name="config_more_keys_keyboard_key_height">63.0dp</dimen>
<dimen name="config_more_keys_keyboard_key_horizontal_padding">12dp</dimen>
@ -40,16 +39,19 @@
<!-- config_more_keys_keyboard_key_height x 1.2 -->
<dimen name="config_more_keys_keyboard_slide_allowance">98.3dp</dimen>
<dimen name="config_key_preview_height">94.5dp</dimen>
<fraction name="config_key_preview_text_ratio">50%</fraction>
<fraction name="config_key_letter_ratio">40%</fraction>
<fraction name="config_key_letter_ratio_holo">40%</fraction>
<fraction name="config_key_letter_ratio_lxx">50%</fraction>
<fraction name="config_key_large_letter_ratio_holo">42%</fraction>
<fraction name="config_key_large_letter_ratio_lxx">60%</fraction>
<fraction name="config_key_label_ratio">28%</fraction>
<fraction name="config_key_hint_letter_ratio">23%</fraction>
<fraction name="config_key_label_ratio_holo">28%</fraction>
<fraction name="config_key_label_ratio_lxx">32%</fraction>
<fraction name="config_key_hint_letter_ratio_holo">23%</fraction>
<fraction name="config_key_hint_letter_ratio_lxx">23%</fraction>
<fraction name="config_key_hint_label_ratio_holo">28%</fraction>
<fraction name="config_key_hint_label_ratio_lxx">20%</fraction>
<fraction name="config_key_shifted_letter_hint_ratio">26%</fraction>
<fraction name="config_key_shifted_letter_hint_ratio_holo">26%</fraction>
<fraction name="config_key_shifted_letter_hint_ratio_lxx">26%</fraction>
<fraction name="config_language_on_spacebar_text_ratio">29.03%</fraction>
<dimen name="config_key_hint_letter_padding">3dp</dimen>
<dimen name="config_key_shifted_letter_hint_padding">3dp</dimen>

View File

@ -43,17 +43,22 @@
<!-- config_more_keys_keyboard_key_height x -0.5 -->
<dimen name="config_more_keys_keyboard_vertical_correction_holo">-26.4dp</dimen>
<dimen name="config_key_preview_offset_holo">8.0dp</dimen>
<dimen name="config_key_preview_height">80dp</dimen>
<dimen name="config_key_preview_height_holo">80dp</dimen>
<dimen name="config_key_preview_offset_lxx">50.0dp</dimen>
<dimen name="config_key_preview_height_lxx">122dp</dimen>
<fraction name="config_key_preview_text_ratio">82%</fraction>
<fraction name="config_key_letter_ratio">55%</fraction>
<fraction name="config_key_letter_ratio_holo">55%</fraction>
<fraction name="config_key_letter_ratio_lxx">55%</fraction>
<fraction name="config_key_large_letter_ratio_holo">65%</fraction>
<fraction name="config_key_large_letter_ratio_lxx">90%</fraction>
<fraction name="config_key_label_ratio">34%</fraction>
<fraction name="config_key_hint_letter_ratio">25%</fraction>
<fraction name="config_key_label_ratio_holo">34%</fraction>
<fraction name="config_key_label_ratio_lxx">34%</fraction>
<fraction name="config_key_hint_letter_ratio_holo">25%</fraction>
<fraction name="config_key_hint_letter_ratio_lxx">25%</fraction>
<fraction name="config_key_hint_label_ratio_holo">44%</fraction>
<fraction name="config_key_hint_label_ratio_lxx">30%</fraction>
<fraction name="config_key_shifted_letter_hint_ratio">35%</fraction>
<fraction name="config_key_shifted_letter_hint_ratio_holo">35%</fraction>
<fraction name="config_key_shifted_letter_hint_ratio_lxx">35%</fraction>
<fraction name="config_language_on_spacebar_text_ratio">33.735%</fraction>
<dimen name="config_key_hint_letter_padding">1dp</dimen>
<dimen name="config_key_shifted_letter_hint_padding">2dp</dimen>

View File

@ -36,18 +36,20 @@
<!-- 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>
<!-- Settings screen title for input preferences [CHAR LIMIT=33]-->
<string name="settings_screen_input">Input preferences</string>
<!-- Settings screen title for appearance preferences [CHAR LIMIT=33] -->
<string name="settings_screen_appearances">Appearance</string>
<!-- Settings screen title for multi lingual options [CHAR_LIMIT=33] -->
<string name="settings_screen_multi_lingual">Multi lingual options</string>
<!-- Settings screen title for preferences [CHAR LIMIT=33]-->
<string name="settings_screen_preferences">Preferences</string>
<!-- Settings screen title for appearance & layouts preferences [CHAR LIMIT=33] -->
<string name="settings_screen_appearance">Appearance &amp; layouts</string>
<!-- Settings screen title for multilingual options [CHAR_LIMIT=33] -->
<string name="settings_screen_multilingual">Multilingual options</string>
<!-- Settings screen title for gesture typing preferences [CHAR_LIMIT=33] -->
<string name="settings_screen_gesture">Gesture typing preferences</string>
<string name="settings_screen_gesture">Gesture Typing</string>
<!-- Settings screen title for text correction options [CHAR_LIMIT=33] -->
<string name="settings_screen_correction">Text correction</string>
<!-- Settings screen title for advanced settings [CHAR LIMIT=33] -->
<string name="settings_screen_advanced">Advanced</string>
<!-- Settings screen title for keyboard theme settings [CHAR LIMIT=33] -->
<string name="settings_screen_theme">Theme</string>
<!-- Option name for including other IMEs in the language switch list [CHAR LIMIT=30] -->
<string name="include_other_imes_in_language_switch_list">Switch to other input methods</string>
@ -152,14 +154,14 @@
<string name="configure_input_method">Configure input methods</string>
<!-- Title for input language selection screen -->
<string name="language_selection_title">Input languages</string>
<string name="language_selection_title">Languages</string>
<!-- Title for the 'Help & feedback' settings fragment which shows a help page and has a button
for submitting feedback. [CHAR LIMIT=35] -->
<string name="help_and_feedback">Help &amp; feedback</string>
<!-- Preference for input language selection -->
<string name="select_language">Input languages</string>
<string name="select_language">Languages</string>
<!-- Add to dictionary hint -->
<string name="hint_add_to_dictionary">Touch again to save</string>

View File

@ -37,12 +37,6 @@
<!-- This keyBackground is needed to run unit tests based on {@link InputTestBase}. -->
<!-- TODO: Apply default {@link KeyboardTheme} to {@link InputTestBase} and remove this. -->
<item name="keyBackground">@drawable/btn_keyboard_key_klp</item>
<item name="keyLetterSize">@fraction/config_key_letter_ratio</item>
<item name="keyLargeLetterRatio">@fraction/config_key_large_letter_ratio_holo</item>
<item name="keyLabelSize">@fraction/config_key_label_ratio</item>
<item name="keyHintLetterRatio">@fraction/config_key_hint_letter_ratio</item>
<item name="keyHintLabelRatio">@fraction/config_key_hint_label_ratio_holo</item>
<item name="keyShiftedLetterHintRatio">@fraction/config_key_shifted_letter_hint_ratio</item>
<item name="keyTypeface">normal</item>
<!-- A negative value to disable key text shadow layer. -->
<item name="keyTextShadowRadius">-1.0</item>
@ -81,7 +75,6 @@
<item name="keyRepeatInterval">@integer/config_key_repeat_interval</item>
<item name="longPressShiftLockTimeout">@integer/config_longpress_shift_lock_timeout</item>
<item name="ignoreAltCodeKeyTimeout">@integer/config_ignore_alt_code_key_timeout</item>
<item name="keyPreviewHeight">@dimen/config_key_preview_height</item>
<!-- TODO: consolidate key preview linger timeout with the key preview animation parameters. -->
<item name="keyPreviewLingerTimeout">@integer/config_key_preview_linger_timeout</item>
<item name="moreKeysKeyboardLayout">@layout/more_keys_keyboard</item>

View File

@ -25,6 +25,10 @@
parent="KeyboardView"
>
<item name="keyTypeface">bold</item>
<item name="keyLetterSize">@fraction/config_key_letter_ratio_holo</item>
<item name="keyLabelSize">@fraction/config_key_label_ratio_holo</item>
<item name="keyHintLetterRatio">@fraction/config_key_hint_letter_ratio_holo</item>
<item name="keyShiftedLetterHintRatio">@fraction/config_key_shifted_letter_hint_ratio_holo</item>
<item name="keyLargeLetterRatio">@fraction/config_key_large_letter_ratio_holo</item>
<item name="keyLabelOffCenterRatio">-175%</item>
<item name="keyHintLabelRatio">@fraction/config_key_hint_label_ratio_holo</item>

View File

@ -60,6 +60,7 @@
parent="KeyboardView.ICS"
>
<item name="keyPreviewBackground">@drawable/keyboard_key_feedback_ics</item>
<item name="keyPreviewHeight">@dimen/config_key_preview_height_holo</item>
<item name="keyPreviewOffset">@dimen/config_key_preview_offset_holo</item>
<item name="keyPreviewShowUpAnimator">@anim/key_preview_show_up_holo</item>
<item name="keyPreviewDismissAnimator">@anim/key_preview_dismiss_holo</item>

View File

@ -60,6 +60,7 @@
parent="KeyboardView.KLP"
>
<item name="keyPreviewBackground">@drawable/keyboard_key_feedback_klp</item>
<item name="keyPreviewHeight">@dimen/config_key_preview_height_holo</item>
<item name="keyPreviewOffset">@dimen/config_key_preview_offset_holo</item>
<item name="keyPreviewShowUpAnimator">@anim/key_preview_show_up_holo</item>
<item name="keyPreviewDismissAnimator">@anim/key_preview_dismiss_holo</item>

View File

@ -60,7 +60,8 @@
>
<item name="moreKeysKeyboardForActionLayout">@layout/more_keys_keyboard_for_action_lxx</item>
<item name="keyPreviewBackground">@drawable/keyboard_key_feedback_lxx_dark</item>
<item name="keyPreviewOffset">@dimen/config_key_preview_offset_holo</item>
<item name="keyPreviewHeight">@dimen/config_key_preview_height_lxx</item>
<item name="keyPreviewOffset">@dimen/config_key_preview_offset_lxx</item>
<item name="keyPreviewShowUpAnimator">@anim/key_preview_show_up_lxx</item>
<item name="keyPreviewDismissAnimator">@anim/key_preview_dismiss_lxx</item>
<item name="gestureFloatingPreviewTextColor">@color/auto_correct_color_lxx_dark</item>

View File

@ -60,7 +60,8 @@
>
<item name="moreKeysKeyboardForActionLayout">@layout/more_keys_keyboard_for_action_lxx</item>
<item name="keyPreviewBackground">@drawable/keyboard_key_feedback_lxx_light</item>
<item name="keyPreviewOffset">@dimen/config_key_preview_offset_holo</item>
<item name="keyPreviewHeight">@dimen/config_key_preview_height_lxx</item>
<item name="keyPreviewOffset">@dimen/config_key_preview_offset_lxx</item>
<item name="keyPreviewShowUpAnimator">@anim/key_preview_show_up_lxx</item>
<item name="keyPreviewDismissAnimator">@anim/key_preview_dismiss_lxx</item>
<item name="gestureFloatingPreviewTextColor">@color/auto_correct_color_lxx_light</item>

View File

@ -25,6 +25,10 @@
parent="KeyboardView"
>
<item name="keyTypeface">normal</item>
<item name="keyLetterSize">@fraction/config_key_letter_ratio_lxx</item>
<item name="keyLabelSize">@fraction/config_key_label_ratio_lxx</item>
<item name="keyHintLetterRatio">@fraction/config_key_hint_letter_ratio_lxx</item>
<item name="keyShiftedLetterHintRatio">@fraction/config_key_shifted_letter_hint_ratio_lxx</item>
<item name="keyLargeLetterRatio">@fraction/config_key_large_letter_ratio_lxx</item>
<item name="keyLabelOffCenterRatio">-80%</item>
<item name="keyHintLabelRatio">@fraction/config_key_hint_label_ratio_lxx</item>

View File

@ -19,17 +19,17 @@
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
android:key="english_ime_settings">
<PreferenceScreen
android:fragment="com.android.inputmethod.latin.settings.InputSettingsFragment"
android:title="@string/settings_screen_input"
android:key="screen_input" />
android:fragment="com.android.inputmethod.latin.settings.PreferencesSettingsFragment"
android:title="@string/settings_screen_preferences"
android:key="screen_preferences" />
<PreferenceScreen
android:fragment="com.android.inputmethod.latin.settings.ThemeSettingsFragment"
android:title="@string/keyboard_theme"
android:key="screen_theme" />
android:fragment="com.android.inputmethod.latin.settings.AppearanceSettingsFragment"
android:title="@string/settings_screen_appearance"
android:key="screen_appearance" />
<PreferenceScreen
android:fragment="com.android.inputmethod.latin.settings.MultiLingualSettingsFragment"
android:title="@string/settings_screen_multi_lingual"
android:key="screen_multi_lingual" />
android:title="@string/settings_screen_multilingual"
android:key="screen_multilingual" />
<PreferenceScreen
android:fragment="com.android.inputmethod.latin.settings.GestureSettingsFragment"
android:title="@string/settings_screen_gesture"

View File

@ -0,0 +1,29 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2014 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"
android:key="screen_appearance"
android:title="@string/settings_screen_appearance">
<PreferenceScreen
android:fragment="com.android.inputmethod.latin.settings.ThemeSettingsFragment"
android:key="screen_theme"
android:title="@string/settings_screen_theme" />
<PreferenceScreen
android:fragment="com.android.inputmethod.latin.settings.CustomInputStyleSettingsFragment"
android:key="custom_input_styles"
android:title="@string/custom_input_styles_title" />
</PreferenceScreen>

View File

@ -16,8 +16,8 @@
<PreferenceScreen
xmlns:android="http://schemas.android.com/apk/res/android"
android:title="@string/settings_screen_multi_lingual"
android:key="screen_multi_lingual">
android:title="@string/settings_screen_multilingual"
android:key="screen_multilingual">
<CheckBoxPreference
android:key="pref_show_language_switch_key"
android:title="@string/show_language_switch_key"
@ -31,8 +31,4 @@
android:summary="@string/include_other_imes_in_language_switch_list_summary"
android:defaultValue="false"
android:persistent="true" />
<PreferenceScreen
android:fragment="com.android.inputmethod.latin.settings.CustomInputStyleSettingsFragment"
android:key="custom_input_styles"
android:title="@string/custom_input_styles_title" />
</PreferenceScreen>

View File

@ -17,7 +17,7 @@
<PreferenceScreen
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
android:title="@string/settings_screen_input">
android:title="@string/settings_screen_preferences">
<CheckBoxPreference
android:key="auto_cap"
android:title="@string/auto_cap"

View File

@ -17,7 +17,7 @@
<PreferenceScreen
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
android:title="@string/keyboard_theme"
android:title="@string/settings_screen_theme"
android:key="screen_theme">
<!-- Keyboard theme list will be populated programmatically here. -->
</PreferenceScreen>

View File

@ -18,7 +18,6 @@ package com.android.inputmethod.keyboard;
import android.content.Context;
import android.content.SharedPreferences;
import android.content.res.Configuration;
import android.content.res.Resources;
import android.preference.PreferenceManager;
import android.util.Log;
@ -256,13 +255,12 @@ public final class KeyboardSwitcher implements KeyboardState.SwitchActions {
}
public void onToggleEmojiKeyboard() {
if (mKeyboardLayoutSet == null) {
return;
}
if (isShowingEmojiPalettes()) {
setAlphabetKeyboard();
} else {
if (mKeyboardLayoutSet == null || !isShowingEmojiPalettes()) {
mLatinIME.startShowingInputView();
setEmojiKeyboard();
} else {
mLatinIME.stopShowingInputView();
setAlphabetKeyboard();
}
}

View File

@ -42,6 +42,7 @@ public final class InputAttributes {
final public boolean mApplicationSpecifiedCompletionOn;
final public boolean mShouldInsertSpacesAutomatically;
final public boolean mShouldShowVoiceInputKey;
final public boolean mIsGeneralTextInput;
final private int mInputType;
final private EditorInfo mEditorInfo;
final private String mPackageNameForPrivateImeOptions;
@ -76,6 +77,7 @@ public final class InputAttributes {
mApplicationSpecifiedCompletionOn = false;
mShouldInsertSpacesAutomatically = false;
mShouldShowVoiceInputKey = false;
mIsGeneralTextInput = false;
return;
}
// inputClass == InputType.TYPE_CLASS_TEXT
@ -117,6 +119,15 @@ public final class InputAttributes {
|| (!flagAutoCorrect && !flagMultiLine);
mApplicationSpecifiedCompletionOn = flagAutoComplete && isFullscreenMode;
// If we come here, inputClass is always TYPE_CLASS_TEXT
mIsGeneralTextInput = InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS != variation
&& InputType.TYPE_TEXT_VARIATION_PASSWORD != variation
&& InputType.TYPE_TEXT_VARIATION_PHONETIC != variation
&& InputType.TYPE_TEXT_VARIATION_URI != variation
&& InputType.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD != variation
&& InputType.TYPE_TEXT_VARIATION_WEB_EMAIL_ADDRESS != variation
&& InputType.TYPE_TEXT_VARIATION_WEB_PASSWORD != variation;
}
public boolean isTypeNull() {

View File

@ -52,7 +52,6 @@ import android.view.WindowManager;
import android.view.inputmethod.CompletionInfo;
import android.view.inputmethod.CursorAnchorInfo;
import android.view.inputmethod.EditorInfo;
import android.view.inputmethod.InputMethod;
import android.view.inputmethod.InputMethodSubtype;
import android.widget.TextView;
@ -87,8 +86,8 @@ import com.android.inputmethod.latin.suggestions.SuggestionStripView;
import com.android.inputmethod.latin.suggestions.SuggestionStripViewAccessor;
import com.android.inputmethod.latin.utils.ApplicationUtils;
import com.android.inputmethod.latin.utils.CapsModeUtils;
import com.android.inputmethod.latin.utils.CursorAnchorInfoUtils;
import com.android.inputmethod.latin.utils.CoordinateUtils;
import com.android.inputmethod.latin.utils.CursorAnchorInfoUtils;
import com.android.inputmethod.latin.utils.DialogUtils;
import com.android.inputmethod.latin.utils.DistracterFilterCheckingExactMatchesAndSuggestions;
import com.android.inputmethod.latin.utils.ImportantNoticeUtils;
@ -162,6 +161,9 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
private final SubtypeSwitcher mSubtypeSwitcher;
private final SubtypeState mSubtypeState = new SubtypeState();
private final SpecialKeyDetector mSpecialKeyDetector;
// Working variable for {@link #startShowingInputView()} and
// {@link #onEvaluateInputViewShown()}.
private boolean mIsExecutingStartShowingInputView;
// Object for reacting to adding/removing a dictionary pack.
private final BroadcastReceiver mDictionaryPackInstallReceiver =
@ -1187,22 +1189,24 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
outInsets.visibleTopInsets = visibleTopY;
}
@Override
public boolean onEvaluateInputViewShown() {
// Always show {@link InputView}.
return true;
public void startShowingInputView() {
mIsExecutingStartShowingInputView = true;
// This {@link #showWindow(boolean)} will eventually call back
// {@link #onEvaluateInputViewShown()}.
showWindow(true /* showInput */);
mIsExecutingStartShowingInputView = false;
}
public void stopShowingInputView() {
showWindow(false /* showInput */);
}
@Override
public boolean onShowInputRequested(final int flags, final boolean configChange) {
final SettingsValues settingsValues = mSettings.getCurrent();
if ((flags & InputMethod.SHOW_EXPLICIT) == 0 && settingsValues.mHasHardwareKeyboard) {
// Even when IME is implicitly shown and physical keyboard is connected, we should
// show {@link InputView}.
// See {@link InputMethodService#onShowInputRequested(int,boolean)}.
public boolean onEvaluateInputViewShown() {
if (mIsExecutingStartShowingInputView) {
return true;
}
return super.onShowInputRequested(flags, configChange);
return super.onEvaluateInputViewShown();
}
@Override
@ -1221,9 +1225,8 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
// hack for now. Let's get rid of this once the framework gets fixed.
final EditorInfo ei = getCurrentInputEditorInfo();
return !(ei != null && ((ei.imeOptions & EditorInfo.IME_FLAG_NO_EXTRACT_UI) != 0));
} else {
return false;
}
return false;
}
@Override
@ -1273,9 +1276,8 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
if (null == keyboard) {
return CoordinateUtils.newCoordinateArray(codePoints.length,
Constants.NOT_A_COORDINATE, Constants.NOT_A_COORDINATE);
} else {
return keyboard.getCoordinates(codePoints);
}
return keyboard.getCoordinates(codePoints);
}
// Callback for the {@link SuggestionStripView}, to call when the "add to dictionary" hint is

View File

@ -0,0 +1,41 @@
/*
* Copyright (C) 2014 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.
*/
package com.android.inputmethod.latin.settings;
import android.os.Bundle;
import com.android.inputmethod.latin.R;
/**
* "Appearance" settings sub screen.
*/
public final class AppearanceSettingsFragment extends SubScreenFragment {
@Override
public void onCreate(final Bundle icicle) {
super.onCreate(icicle);
addPreferencesFromResource(R.xml.prefs_screen_appearance);
}
@Override
public void onResume() {
super.onResume();
CustomInputStyleSettingsFragment.updateCustomInputStylesSummary(
findPreference(Settings.PREF_CUSTOM_INPUT_STYLES));
ThemeSettingsFragment.updateKeyboardThemeSummary(findPreference(Settings.SCREEN_THEME));
}
}

View File

@ -31,6 +31,7 @@ import android.preference.Preference;
import android.preference.PreferenceFragment;
import android.preference.PreferenceGroup;
import android.support.v4.view.ViewCompat;
import android.text.TextUtils;
import android.util.Pair;
import android.view.LayoutInflater;
import android.view.Menu;
@ -396,6 +397,25 @@ public final class CustomInputStyleSettingsFragment extends PreferenceFragment {
// Empty constructor for fragment generation.
}
static void updateCustomInputStylesSummary(final Preference pref) {
// When we are called from the Settings application but we are not already running, some
// singleton and utility classes may not have been initialized. We have to call
// initialization method of these classes here. See {@link LatinIME#onCreate()}.
SubtypeLocaleUtils.init(pref.getContext());
final Resources res = pref.getContext().getResources();
final SharedPreferences prefs = pref.getSharedPreferences();
final String prefSubtype = Settings.readPrefAdditionalSubtypes(prefs, res);
final InputMethodSubtype[] subtypes =
AdditionalSubtypeUtils.createAdditionalSubtypesArray(prefSubtype);
final ArrayList<String> subtypeNames = new ArrayList<>();
for (final InputMethodSubtype subtype : subtypes) {
subtypeNames.add(SubtypeLocaleUtils.getSubtypeDisplayNameInSystemLocale(subtype));
}
// TODO: A delimiter of custom input styles should be localized.
pref.setSummary(TextUtils.join(", ", subtypeNames));
}
@Override
public void onCreate(final Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

View File

@ -16,66 +16,27 @@
package com.android.inputmethod.latin.settings;
import android.content.Context;
import android.content.SharedPreferences;
import android.content.res.Resources;
import android.os.Bundle;
import android.preference.PreferenceScreen;
import android.text.TextUtils;
import android.view.inputmethod.InputMethodSubtype;
import com.android.inputmethod.latin.R;
import com.android.inputmethod.latin.utils.AdditionalSubtypeUtils;
import com.android.inputmethod.latin.utils.SubtypeLocaleUtils;
import java.util.ArrayList;
/**
* "Multi lingual options" settings sub screen.
* "Multilingual options" settings sub screen.
*
* This settings sub screen handles the following input preferences.
* - Language switch key
* - Switch to other input methods
* - Custom input styles
*/
public final class MultiLingualSettingsFragment extends SubScreenFragment {
@Override
public void onCreate(final Bundle icicle) {
super.onCreate(icicle);
addPreferencesFromResource(R.xml.prefs_screen_multi_lingual);
final Context context = getActivity();
// When we are called from the Settings application but we are not already running, some
// singleton and utility classes may not have been initialized. We have to call
// initialization method of these classes here. See {@link LatinIME#onCreate()}.
SubtypeLocaleUtils.init(context);
addPreferencesFromResource(R.xml.prefs_screen_multilingual);
if (!Settings.ENABLE_SHOW_LANGUAGE_SWITCH_KEY_SETTINGS) {
removePreference(Settings.PREF_SHOW_LANGUAGE_SWITCH_KEY);
removePreference(Settings.PREF_INCLUDE_OTHER_IMES_IN_LANGUAGE_SWITCH_LIST);
}
}
@Override
public void onResume() {
super.onResume();
updateCustomInputStylesSummary();
}
private void updateCustomInputStylesSummary() {
final SharedPreferences prefs = getSharedPreferences();
final Resources res = getResources();
final PreferenceScreen customInputStyles =
(PreferenceScreen)findPreference(Settings.PREF_CUSTOM_INPUT_STYLES);
final String prefSubtype = Settings.readPrefAdditionalSubtypes(prefs, res);
final InputMethodSubtype[] subtypes =
AdditionalSubtypeUtils.createAdditionalSubtypesArray(prefSubtype);
final ArrayList<String> subtypeNames = new ArrayList<>();
for (final InputMethodSubtype subtype : subtypes) {
subtypeNames.add(SubtypeLocaleUtils.getSubtypeDisplayNameInSystemLocale(subtype));
}
// TODO: A delimiter of custom input styles should be localized.
customInputStyles.setSummary(TextUtils.join(", ", subtypeNames));
}
}

View File

@ -27,7 +27,7 @@ import com.android.inputmethod.latin.R;
import com.android.inputmethod.latin.SubtypeSwitcher;
/**
* "Input preferences" settings sub screen.
* "Preferences" settings sub screen.
*
* This settings sub screen handles the following input preferences.
* - Auto-capitalization
@ -37,11 +37,11 @@ import com.android.inputmethod.latin.SubtypeSwitcher;
* - Popup on keypress
* - Voice input key
*/
public final class InputSettingsFragment extends SubScreenFragment {
public final class PreferencesSettingsFragment extends SubScreenFragment {
@Override
public void onCreate(final Bundle icicle) {
super.onCreate(icicle);
addPreferencesFromResource(R.xml.prefs_screen_input);
addPreferencesFromResource(R.xml.prefs_screen_preferences);
final Resources res = getResources();
final Context context = getActivity();

View File

@ -42,9 +42,10 @@ import java.util.concurrent.locks.ReentrantLock;
public final class Settings implements SharedPreferences.OnSharedPreferenceChangeListener {
private static final String TAG = Settings.class.getSimpleName();
// Settings screens
public static final String SCREEN_INPUT = "screen_input";
public static final String SCREEN_PREFERENCES = "screen_preferences";
public static final String SCREEN_APPEARANCE = "screen_appearance";
public static final String SCREEN_THEME = "screen_theme";
public static final String SCREEN_MULTI_LINGUAL = "screen_multi_lingual";
public static final String SCREEN_MULTILINGUAL = "screen_multilingual";
public static final String SCREEN_GESTURE = "screen_gesture";
public static final String SCREEN_CORRECTION = "screen_correction";
public static final String SCREEN_ADVANCED = "screen_advanced";
@ -69,6 +70,9 @@ public final class Settings implements SharedPreferences.OnSharedPreferenceChang
"pref_key_use_double_space_period";
public static final String PREF_BLOCK_POTENTIALLY_OFFENSIVE =
"pref_key_block_potentially_offensive";
// No multilingual options in Android L and above for now.
public static final boolean SHOW_MULTILINGUAL_SETTINGS =
BuildCompatUtils.EFFECTIVE_SDK_INT <= Build.VERSION_CODES.KITKAT;
public static final boolean ENABLE_SHOW_LANGUAGE_SWITCH_KEY_SETTINGS =
BuildCompatUtils.EFFECTIVE_SDK_INT <= Build.VERSION_CODES.KITKAT;
public static final boolean HAS_UI_TO_ACCEPT_TYPED_WORD =

View File

@ -18,6 +18,7 @@ package com.android.inputmethod.latin.settings;
import android.content.Intent;
import android.os.Bundle;
import android.preference.Preference;
import android.preference.PreferenceScreen;
import android.view.Menu;
import android.view.MenuInflater;
@ -46,12 +47,10 @@ public final class SettingsFragment extends InputMethodSettingsFragment {
final PreferenceScreen preferenceScreen = getPreferenceScreen();
preferenceScreen.setTitle(
ApplicationUtils.getActivityTitleResId(getActivity(), SettingsActivity.class));
}
@Override
public void onResume() {
super.onResume();
ThemeSettingsFragment.updateKeyboardThemeSummary(findPreference(Settings.SCREEN_THEME));
if (!Settings.SHOW_MULTILINGUAL_SETTINGS) {
final Preference multilingualOptions = findPreference(Settings.SCREEN_MULTILINGUAL);
preferenceScreen.removePreference(multilingualOptions);
}
}
@Override

View File

@ -148,7 +148,8 @@ public final class SettingsValues {
? Settings.readShowsLanguageSwitchKey(prefs) : true /* forcibly */;
mUseContactsDict = prefs.getBoolean(Settings.PREF_KEY_USE_CONTACTS_DICT, true);
mUsePersonalizedDicts = prefs.getBoolean(Settings.PREF_KEY_USE_PERSONALIZED_DICTS, true);
mUseDoubleSpacePeriod = prefs.getBoolean(Settings.PREF_KEY_USE_DOUBLE_SPACE_PERIOD, true);
mUseDoubleSpacePeriod = prefs.getBoolean(Settings.PREF_KEY_USE_DOUBLE_SPACE_PERIOD, true)
&& inputAttributes.mIsGeneralTextInput;
mBlockPotentiallyOffensive = Settings.readBlockPotentiallyOffensive(prefs, res);
mAutoCorrectEnabled = Settings.readAutoCorrectEnabled(autoCorrectionThresholdRawValue, res);
mBigramPredictionEnabled = readBigramPredictionEnabled(prefs, res);

View File

@ -19,12 +19,13 @@ package com.android.inputmethod.latin.utils;
import com.android.inputmethod.dictionarypack.DictionarySettingsFragment;
import com.android.inputmethod.latin.about.AboutPreferences;
import com.android.inputmethod.latin.settings.AdvancedSettingsFragment;
import com.android.inputmethod.latin.settings.AppearanceSettingsFragment;
import com.android.inputmethod.latin.settings.CorrectionSettingsFragment;
import com.android.inputmethod.latin.settings.CustomInputStyleSettingsFragment;
import com.android.inputmethod.latin.settings.DebugSettingsFragment;
import com.android.inputmethod.latin.settings.GestureSettingsFragment;
import com.android.inputmethod.latin.settings.InputSettingsFragment;
import com.android.inputmethod.latin.settings.MultiLingualSettingsFragment;
import com.android.inputmethod.latin.settings.PreferencesSettingsFragment;
import com.android.inputmethod.latin.settings.SettingsFragment;
import com.android.inputmethod.latin.settings.ThemeSettingsFragment;
import com.android.inputmethod.latin.spellcheck.SpellCheckerSettingsFragment;
@ -40,7 +41,8 @@ public class FragmentUtils {
static {
sLatinImeFragments.add(DictionarySettingsFragment.class.getName());
sLatinImeFragments.add(AboutPreferences.class.getName());
sLatinImeFragments.add(InputSettingsFragment.class.getName());
sLatinImeFragments.add(PreferencesSettingsFragment.class.getName());
sLatinImeFragments.add(AppearanceSettingsFragment.class.getName());
sLatinImeFragments.add(ThemeSettingsFragment.class.getName());
sLatinImeFragments.add(MultiLingualSettingsFragment.class.getName());
sLatinImeFragments.add(CustomInputStyleSettingsFragment.class.getName());