aboutsummaryrefslogtreecommitdiffstats
path: root/java
diff options
context:
space:
mode:
Diffstat (limited to 'java')
-rw-r--r--java/res/drawable-hdpi/ic_emoji_dark.pngbin0 -> 1858 bytes
-rw-r--r--java/res/drawable-hdpi/ic_emoji_light.pngbin0 -> 1820 bytes
-rw-r--r--java/res/drawable-mdpi/ic_emoji_dark.pngbin0 -> 1182 bytes
-rw-r--r--java/res/drawable-mdpi/ic_emoji_light.pngbin0 -> 1132 bytes
-rw-r--r--java/res/drawable-xhdpi/ic_emoji_dark.pngbin0 -> 2631 bytes
-rw-r--r--java/res/drawable-xhdpi/ic_emoji_light.pngbin0 -> 2526 bytes
-rw-r--r--java/res/layout/input_view.xml37
-rw-r--r--java/res/values/attrs.xml2
-rw-r--r--java/res/values/keyboard-icons-black.xml1
-rw-r--r--java/res/values/keyboard-icons-ics.xml1
-rw-r--r--java/res/values/keyboard-icons-white.xml1
-rw-r--r--java/res/values/strings.xml91
-rw-r--r--java/res/values/styles.xml10
-rw-r--r--java/res/values/themes-basic-highcontrast.xml1
-rw-r--r--java/res/values/themes-basic.xml1
-rw-r--r--java/res/values/themes-gingerbread.xml1
-rw-r--r--java/res/values/themes-ics.xml1
-rw-r--r--java/res/values/themes-stone-bold.xml1
-rw-r--r--java/res/values/themes-stone.xml1
-rw-r--r--java/res/xml-sw600dp/key_styles_common.xml5
-rw-r--r--java/res/xml-sw600dp/rows_10_10_7_symbols.xml2
-rw-r--r--java/res/xml-sw768dp/key_styles_common.xml5
-rw-r--r--java/res/xml/key_styles_common.xml5
-rw-r--r--java/src/com/android/inputmethod/keyboard/internal/KeyboardCodesSet.java3
-rw-r--r--java/src/com/android/inputmethod/keyboard/internal/KeyboardIconsSet.java1
-rw-r--r--java/src/com/android/inputmethod/keyboard/internal/KeyboardTextsSet.java4
-rw-r--r--java/src/com/android/inputmethod/latin/Constants.java2
-rw-r--r--java/src/com/android/inputmethod/latin/InputView.java32
-rw-r--r--java/src/com/android/inputmethod/latin/LatinIME.java21
29 files changed, 142 insertions, 87 deletions
diff --git a/java/res/drawable-hdpi/ic_emoji_dark.png b/java/res/drawable-hdpi/ic_emoji_dark.png
new file mode 100644
index 000000000..a9f18cde0
--- /dev/null
+++ b/java/res/drawable-hdpi/ic_emoji_dark.png
Binary files differ
diff --git a/java/res/drawable-hdpi/ic_emoji_light.png b/java/res/drawable-hdpi/ic_emoji_light.png
new file mode 100644
index 000000000..2e3638bf3
--- /dev/null
+++ b/java/res/drawable-hdpi/ic_emoji_light.png
Binary files differ
diff --git a/java/res/drawable-mdpi/ic_emoji_dark.png b/java/res/drawable-mdpi/ic_emoji_dark.png
new file mode 100644
index 000000000..d0047a437
--- /dev/null
+++ b/java/res/drawable-mdpi/ic_emoji_dark.png
Binary files differ
diff --git a/java/res/drawable-mdpi/ic_emoji_light.png b/java/res/drawable-mdpi/ic_emoji_light.png
new file mode 100644
index 000000000..a3195041a
--- /dev/null
+++ b/java/res/drawable-mdpi/ic_emoji_light.png
Binary files differ
diff --git a/java/res/drawable-xhdpi/ic_emoji_dark.png b/java/res/drawable-xhdpi/ic_emoji_dark.png
new file mode 100644
index 000000000..22daec22e
--- /dev/null
+++ b/java/res/drawable-xhdpi/ic_emoji_dark.png
Binary files differ
diff --git a/java/res/drawable-xhdpi/ic_emoji_light.png b/java/res/drawable-xhdpi/ic_emoji_light.png
new file mode 100644
index 000000000..21bc9090d
--- /dev/null
+++ b/java/res/drawable-xhdpi/ic_emoji_light.png
Binary files differ
diff --git a/java/res/layout/input_view.xml b/java/res/layout/input_view.xml
index 136e18cd5..1ffb8a32a 100644
--- a/java/res/layout/input_view.xml
+++ b/java/res/layout/input_view.xml
@@ -30,34 +30,17 @@
android:layout_width="match_parent"
android:layout_height="0dp" />
- <!-- On tablets, the suggestions strip is centered with horizontal paddings on both sides
- because width of the landscape mode is too long for the suggestions strip. This
- LinearLayout is required to hold the paddings. -->
- <LinearLayout
- android:id="@+id/suggestions_container"
- android:orientation="horizontal"
+ <!-- To ensure that key preview popup is correctly placed when the current system locale is
+ one of RTL locales, layoutDirection="ltr" is needed in the SDK version 17+. -->
+ <com.android.inputmethod.latin.suggestions.SuggestionStripView
+ android:id="@+id/suggestion_strip_view"
+ android:layoutDirection="ltr"
android:layout_width="match_parent"
- android:layout_height="wrap_content"
- >
- <View
- android:layout_width="@dimen/suggestions_strip_padding"
- android:layout_height="@dimen/suggestions_strip_height"
- style="?attr/suggestionsStripBackgroundStyle" />
- <!-- To ensure that key preview popup is correctly placed when the current system locale is
- one of RTL locales, layoutDirection="ltr" is needed in the SDK version 17+. -->
- <com.android.inputmethod.latin.suggestions.SuggestionStripView
- android:id="@+id/suggestion_strip_view"
- android:layoutDirection="ltr"
- android:layout_weight="1.0"
- android:layout_width="0dp"
- android:layout_height="@dimen/suggestions_strip_height"
- android:gravity="center_vertical"
- style="?attr/suggestionStripViewStyle" />
- <View
- android:layout_width="@dimen/suggestions_strip_padding"
- android:layout_height="@dimen/suggestions_strip_height"
- style="?attr/suggestionsStripBackgroundStyle" />
- </LinearLayout>
+ android:layout_height="@dimen/suggestions_strip_height"
+ android:gravity="center_vertical"
+ android:paddingRight="@dimen/suggestions_strip_padding"
+ android:paddingLeft="@dimen/suggestions_strip_padding"
+ style="?attr/suggestionStripViewStyle" />
<!-- To ensure that key preview popup is correctly placed when the current system locale is
one of RTL locales, layoutDirection="ltr" is needed in the SDK version 17+. -->
diff --git a/java/res/values/attrs.xml b/java/res/values/attrs.xml
index c31831747..eef9116da 100644
--- a/java/res/values/attrs.xml
+++ b/java/res/values/attrs.xml
@@ -28,7 +28,6 @@
<attr name="moreKeysKeyboardViewStyle" format="reference" />
<attr name="moreKeysKeyboardPanelStyle" format="reference" />
<!-- Suggestions strip style -->
- <attr name="suggestionsStripBackgroundStyle" format="reference" />
<attr name="suggestionStripViewStyle" format="reference" />
<attr name="moreSuggestionsViewStyle" format="reference" />
<attr name="suggestionBackgroundStyle" format="reference" />
@@ -217,6 +216,7 @@
<attr name="iconLanguageSwitchKey" format="reference" />
<attr name="iconZwnjKey" format="reference" />
<attr name="iconZwjKey" format="reference" />
+ <attr name="iconEmojiKey" format="reference" />
</declare-styleable>
<declare-styleable name="Keyboard_Key">
diff --git a/java/res/values/keyboard-icons-black.xml b/java/res/values/keyboard-icons-black.xml
index e9c5733b5..c1b1b6573 100644
--- a/java/res/values/keyboard-icons-black.xml
+++ b/java/res/values/keyboard-icons-black.xml
@@ -39,5 +39,6 @@
<!-- TODO: Needs dedicated black theme ZWNJ and ZWJ icons -->
<item name="iconZwnjKey">@drawable/sym_keyboard_zwnj_holo</item>
<item name="iconZwjKey">@drawable/sym_keyboard_zwj_holo</item>
+ <item name="iconEmojiKey">@drawable/ic_emoji_light</item>
</style>
</resources>
diff --git a/java/res/values/keyboard-icons-ics.xml b/java/res/values/keyboard-icons-ics.xml
index 8eba196de..5ada27ae8 100644
--- a/java/res/values/keyboard-icons-ics.xml
+++ b/java/res/values/keyboard-icons-ics.xml
@@ -36,5 +36,6 @@
<item name="iconLanguageSwitchKey">@drawable/sym_keyboard_language_switch</item>
<item name="iconZwnjKey">@drawable/sym_keyboard_zwnj_holo</item>
<item name="iconZwjKey">@drawable/sym_keyboard_zwj_holo</item>
+ <item name="iconEmojiKey">@drawable/ic_emoji_light</item>
</style>
</resources>
diff --git a/java/res/values/keyboard-icons-white.xml b/java/res/values/keyboard-icons-white.xml
index e52099867..7c6de42fa 100644
--- a/java/res/values/keyboard-icons-white.xml
+++ b/java/res/values/keyboard-icons-white.xml
@@ -35,5 +35,6 @@
<!-- TODO: Needs dedicated black theme ZWNJ and ZWJ icons -->
<item name="iconZwnjKey">@drawable/sym_keyboard_zwnj_holo</item>
<item name="iconZwjKey">@drawable/sym_keyboard_zwj_holo</item>
+ <item name="iconEmojiKey">@drawable/ic_emoji_dark</item>
</style>
</resources>
diff --git a/java/res/values/strings.xml b/java/res/values/strings.xml
index f572904f0..1eff2f9c3 100644
--- a/java/res/values/strings.xml
+++ b/java/res/values/strings.xml
@@ -380,20 +380,83 @@
This should be identical to subtype_serbian_latin aside from the trailing (%s).
<string name="subtype_with_layout_sr-Latn">Serbian (Latin) (<xliff:g id="layout">%s</xliff:g>)</string>
-->
- <!-- Description for language agnostic keyboard subtype [CHAR LIMIT=25] -->
- <string name="subtype_no_language">No language</string>
- <!-- Description for language agnostic QWERTY keyboard subtype [CHAR LIMIT=25] -->
- <string name="subtype_no_language_qwerty">No language (QWERTY)</string>
- <!-- Description for language agnostic QWERTZ keyboard subtype [CHAR LIMIT=25] -->
- <string name="subtype_no_language_qwertz">No language (QWERTZ)</string>
- <!-- Description for language agnostic AZERTY keyboard subtype [CHAR LIMIT=25] -->
- <string name="subtype_no_language_azerty">No language (AZERTY)</string>
- <!-- Description for language agnostic Dvorak keyboard subtype [CHAR LIMIT=25] -->
- <string name="subtype_no_language_dvorak">No language (Dvorak)</string>
- <!-- Description for language agnostic Colemak keyboard subtype [CHAR LIMIT=25] -->
- <string name="subtype_no_language_colemak">No language (Colemak)</string>
- <!-- Description for language agnostic PC QWERTY keyboard subtype [CHAR LIMIT=25] -->
- <string name="subtype_no_language_pcqwerty">No language (PC)</string>
+ <!-- This string is displayed in a language list that allows to choose a language for
+suggestions in a software keyboard. This setting won't give suggestions in any particular
+language, hence "No language".
+As for the "alphabet" mention, it refers specifically to the Latin alphabet, as opposed to
+Cyrillic, Arabic, Hebrew or other scripts. This keyboard offers no suggestions, but it will
+be a QWERTY, or AZERTY, or any other disposition that only offers Latin characters, so
+you wouldn't be able to type, say, Arabic on it. Please translate it in a way that "alphabet"
+would be understood to mean specifically the Latin alphabet, rather than any other
+alphabet. [CHAR LIMIT=25] -->
+ <string name="subtype_no_language">No language (Alphabet)</string>
+ <!-- This string is displayed in the description for a keyboard type. It refers specifically to
+the Latin alphabet, as opposed to Cyrillic, Arabic, Hebrew or other scripts.
+When the device is configured to use a language using a script other than the Latin alphabet, the
+user still needs a keyboard that can input Latin characters for passwords or login names for
+example, and a way to switch to this Latin alphabet keyboard. This string is the description for
+this keyboard, so users of other scripts should understand when they read this that it represents a
+keyboard that is meant for them to be able to enter Latin characters as opposed to the script they
+are used to. This keyboard does not provide a dictionary, and it is not tied to any specific
+language among those that use the Latin alphabet. This keyboard is laid out in the QWERTY
+disposition rather than other common dispositions for Latin languages. [CHAR LIMIT=25] -->
+ <string name="subtype_no_language_qwerty">Alphabet (QWERTY)</string>
+ <!-- This string is displayed in the description for a keyboard type. It refers specifically to
+the Latin alphabet, as opposed to Cyrillic, Arabic, Hebrew or other scripts.
+When the device is configured to use a language using a script other than the Latin alphabet, the
+user still needs a keyboard that can input Latin characters for passwords or login names for
+example, and a way to switch to this Latin alphabet keyboard. This string is the description for
+this keyboard, so users of other scripts should understand when they read this that it represents a
+keyboard that is meant for them to be able to enter Latin characters as opposed to the script they
+are used to. This keyboard does not provide a dictionary, and it is not tied to any specific
+language among those that use the Latin alphabet. This keyboard is laid out in the QWERTZ
+disposition rather than other common dispositions for Latin languages. [CHAR LIMIT=25] -->
+ <string name="subtype_no_language_qwertz">Alphabet (QWERTZ)</string>
+ <!-- This string is displayed in the description for a keyboard type. It refers specifically to
+the Latin alphabet, as opposed to Cyrillic, Arabic, Hebrew or other scripts.
+When the device is configured to use a language using a script other than the Latin alphabet, the
+user still needs a keyboard that can input Latin characters for passwords or login names for
+example, and a way to switch to this Latin alphabet keyboard. This string is the description for
+this keyboard, so users of other scripts should understand when they read this that it represents a
+keyboard that is meant for them to be able to enter Latin characters as opposed to the script they
+are used to. This keyboard does not provide a dictionary, and it is not tied to any specific
+language among those that use the Latin alphabet. This keyboard is laid out in the AZERTY
+disposition rather than other common dispositions for Latin languages. [CHAR LIMIT=25] -->
+ <string name="subtype_no_language_azerty">Alphabet (AZERTY)</string>
+ <!-- This string is displayed in the description for a keyboard type. It refers specifically to
+the Latin alphabet, as opposed to Cyrillic, Arabic, Hebrew or other scripts.
+When the device is configured to use a language using a script other than the Latin alphabet, the
+user still needs a keyboard that can input Latin characters for passwords or login names for
+example, and a way to switch to this Latin alphabet keyboard. This string is the description for
+this keyboard, so users of other scripts should understand when they read this that it represents a
+keyboard that is meant for them to be able to enter Latin characters as opposed to the script they
+are used to. This keyboard does not provide a dictionary, and it is not tied to any specific
+language among those that use the Latin alphabet. This keyboard is laid out in the Dvorak
+disposition rather than other common dispositions for Latin languages. [CHAR LIMIT=25] -->
+ <string name="subtype_no_language_dvorak">Alphabet (Dvorak)</string>
+ <!-- This string is displayed in the description for a keyboard type. It refers specifically to
+the Latin alphabet, as opposed to Cyrillic, Arabic, Hebrew or other scripts.
+When the device is configured to use a language using a script other than the Latin alphabet, the
+user still needs a keyboard that can input Latin characters for passwords or login names for
+example, and a way to switch to this Latin alphabet keyboard. This string is the description for
+this keyboard, so users of other scripts should understand when they read this that it represents a
+keyboard that is meant for them to be able to enter Latin characters as opposed to the script they
+are used to. This keyboard does not provide a dictionary, and it is not tied to any specific
+language among those that use the Latin alphabet. This keyboard is laid out in the Colemak
+disposition rather than other common dispositions for Latin languages. [CHAR LIMIT=25] -->
+ <string name="subtype_no_language_colemak">Alphabet (Colemak)</string>
+ <!-- This string is displayed in the description for a keyboard type. It refers specifically to
+the Latin alphabet, as opposed to Cyrillic, Arabic, Hebrew or other scripts.
+When the device is configured to use a language using a script other than the Latin alphabet, the
+user still needs a keyboard that can input Latin characters for passwords or login names for
+example, and a way to switch to this Latin alphabet keyboard. This string is the description for
+this keyboard, so users of other scripts should understand when they read this that it represents a
+keyboard that is meant for them to be able to enter Latin characters as opposed to the script they
+are used to. This keyboard does not provide a dictionary, and it is not tied to any specific
+language among those that use the Latin alphabet. This keyboard is laid out in the QWERTY PC
+disposition that offers additional keys, but smaller keys compared to other common dispositions for
+mobile devices. [CHAR LIMIT=25] -->
+ <string name="subtype_no_language_pcqwerty">Alphabet (PC)</string>
<!-- Title of the preference settings for custom input styles (language and keyboard layout pairs) [CHAR LIMIT=35]-->
<string name="custom_input_styles_title">Custom input styles</string>
diff --git a/java/res/values/styles.xml b/java/res/values/styles.xml
index 8b6c29e59..37c6a9553 100644
--- a/java/res/values/styles.xml
+++ b/java/res/values/styles.xml
@@ -145,13 +145,10 @@
<style name="MoreKeysKeyboardPanelStyle">
<item name="android:background">@drawable/keyboard_popup_panel_background</item>
</style>
- <style name="SuggestionsStripBackgroundStyle">
- <item name="android:background">@drawable/keyboard_suggest_strip</item>
- </style>
<style
name="SuggestionStripViewStyle"
- parent="SuggestionsStripBackgroundStyle"
>
+ <item name="android:background">@drawable/keyboard_suggest_strip</item>
<item name="suggestionStripOption">autoCorrectBold|validTypedWordBold</item>
<item name="colorValidTypedWord">@color/highlight_color_default</item>
<item name="colorTypedWord">@color/typed_word_color_default</item>
@@ -380,13 +377,10 @@
<style name="MoreKeysKeyboardPanelStyle.IceCreamSandwich">
<item name="android:background">@drawable/keyboard_popup_panel_background_holo</item>
</style>
- <style name="SuggestionsStripBackgroundStyle.IceCreamSandwich">
- <item name="android:background">@drawable/keyboard_suggest_strip_holo</item>
- </style>
<style
name="SuggestionStripViewStyle.IceCreamSandwich"
- parent="SuggestionsStripBackgroundStyle.IceCreamSandwich"
>
+ <item name="android:background">@drawable/keyboard_suggest_strip_holo</item>
<item name="suggestionStripOption">autoCorrectBold|validTypedWordBold</item>
<item name="colorValidTypedWord">@color/highlight_color_ics</item>
<item name="colorTypedWord">@color/highlight_color_ics</item>
diff --git a/java/res/values/themes-basic-highcontrast.xml b/java/res/values/themes-basic-highcontrast.xml
index 48df0a1b6..e81d47386 100644
--- a/java/res/values/themes-basic-highcontrast.xml
+++ b/java/res/values/themes-basic-highcontrast.xml
@@ -22,7 +22,6 @@
<item name="moreKeysKeyboardStyle">@style/MoreKeysKeyboard</item>
<item name="moreKeysKeyboardViewStyle">@style/MoreKeysKeyboardView</item>
<item name="moreKeysKeyboardPanelStyle">@style/MoreKeysKeyboardPanelStyle</item>
- <item name="suggestionsStripBackgroundStyle">@style/SuggestionsStripBackgroundStyle</item>
<item name="suggestionStripViewStyle">@style/SuggestionStripViewStyle</item>
<item name="moreSuggestionsViewStyle">@style/MoreSuggestionsViewStyle</item>
<item name="suggestionBackgroundStyle">@style/SuggestionBackgroundStyle</item>
diff --git a/java/res/values/themes-basic.xml b/java/res/values/themes-basic.xml
index 88a0c5d8d..c44f0f614 100644
--- a/java/res/values/themes-basic.xml
+++ b/java/res/values/themes-basic.xml
@@ -22,7 +22,6 @@
<item name="moreKeysKeyboardStyle">@style/MoreKeysKeyboard</item>
<item name="moreKeysKeyboardViewStyle">@style/MoreKeysKeyboardView</item>
<item name="moreKeysKeyboardPanelStyle">@style/MoreKeysKeyboardPanelStyle</item>
- <item name="suggestionsStripBackgroundStyle">@style/SuggestionsStripBackgroundStyle</item>
<item name="suggestionStripViewStyle">@style/SuggestionStripViewStyle</item>
<item name="moreSuggestionsViewStyle">@style/MoreSuggestionsViewStyle</item>
<item name="suggestionBackgroundStyle">@style/SuggestionBackgroundStyle</item>
diff --git a/java/res/values/themes-gingerbread.xml b/java/res/values/themes-gingerbread.xml
index 51f680a7a..129afdf5b 100644
--- a/java/res/values/themes-gingerbread.xml
+++ b/java/res/values/themes-gingerbread.xml
@@ -22,7 +22,6 @@
<item name="moreKeysKeyboardStyle">@style/MoreKeysKeyboard.Gingerbread</item>
<item name="moreKeysKeyboardViewStyle">@style/MoreKeysKeyboardView.Gingerbread</item>
<item name="moreKeysKeyboardPanelStyle">@style/MoreKeysKeyboardPanelStyle</item>
- <item name="suggestionsStripBackgroundStyle">@style/SuggestionsStripBackgroundStyle</item>
<item name="suggestionStripViewStyle">@style/SuggestionStripViewStyle</item>
<item name="moreSuggestionsViewStyle">@style/MoreSuggestionsViewStyle</item>
<item name="suggestionBackgroundStyle">@style/SuggestionBackgroundStyle</item>
diff --git a/java/res/values/themes-ics.xml b/java/res/values/themes-ics.xml
index d9c59a180..1264831f3 100644
--- a/java/res/values/themes-ics.xml
+++ b/java/res/values/themes-ics.xml
@@ -22,7 +22,6 @@
<item name="moreKeysKeyboardStyle">@style/MoreKeysKeyboard.IceCreamSandwich</item>
<item name="moreKeysKeyboardViewStyle">@style/MoreKeysKeyboardView.IceCreamSandwich</item>
<item name="moreKeysKeyboardPanelStyle">@style/MoreKeysKeyboardPanelStyle.IceCreamSandwich</item>
- <item name="suggestionsStripBackgroundStyle">@style/SuggestionsStripBackgroundStyle.IceCreamSandwich</item>
<item name="suggestionStripViewStyle">@style/SuggestionStripViewStyle.IceCreamSandwich</item>
<item name="moreSuggestionsViewStyle">@style/MoreSuggestionsViewStyle.IceCreamSandwich</item>
<item name="suggestionBackgroundStyle">@style/SuggestionBackgroundStyle.IceCreamSandwich</item>
diff --git a/java/res/values/themes-stone-bold.xml b/java/res/values/themes-stone-bold.xml
index 6ace9d673..196f3ef9f 100644
--- a/java/res/values/themes-stone-bold.xml
+++ b/java/res/values/themes-stone-bold.xml
@@ -22,7 +22,6 @@
<item name="moreKeysKeyboardStyle">@style/MoreKeysKeyboard.Stone</item>
<item name="moreKeysKeyboardViewStyle">@style/MoreKeysKeyboardView.Stone</item>
<item name="moreKeysKeyboardPanelStyle">@style/MoreKeysKeyboardPanelStyle</item>
- <item name="suggestionsStripBackgroundStyle">@style/SuggestionsStripBackgroundStyle</item>
<item name="suggestionStripViewStyle">@style/SuggestionStripViewStyle</item>
<item name="moreSuggestionsViewStyle">@style/MoreSuggestionsViewStyle</item>
<item name="suggestionBackgroundStyle">@style/SuggestionBackgroundStyle</item>
diff --git a/java/res/values/themes-stone.xml b/java/res/values/themes-stone.xml
index 3c3826b1a..d0d35c28d 100644
--- a/java/res/values/themes-stone.xml
+++ b/java/res/values/themes-stone.xml
@@ -22,7 +22,6 @@
<item name="moreKeysKeyboardStyle">@style/MoreKeysKeyboard.Stone</item>
<item name="moreKeysKeyboardViewStyle">@style/MoreKeysKeyboardView.Stone</item>
<item name="moreKeysKeyboardPanelStyle">@style/MoreKeysKeyboardPanelStyle</item>
- <item name="suggestionsStripBackgroundStyle">@style/SuggestionsStripBackgroundStyle</item>
<item name="suggestionStripViewStyle">@style/SuggestionStripViewStyle</item>
<item name="moreSuggestionsViewStyle">@style/MoreSuggestionsViewStyle</item>
<item name="suggestionBackgroundStyle">@style/SuggestionBackgroundStyle</item>
diff --git a/java/res/xml-sw600dp/key_styles_common.xml b/java/res/xml-sw600dp/key_styles_common.xml
index a2d2fd827..f407ba346 100644
--- a/java/res/xml-sw600dp/key_styles_common.xml
+++ b/java/res/xml-sw600dp/key_styles_common.xml
@@ -120,6 +120,11 @@
latin:keyActionFlags="noKeyPreview|altCodeWhileTyping|enableLongPress"
latin:altCode="!code/key_space" />
<key-style
+ latin:styleName="emojiKeyStyle"
+ latin:code="!code/key_emoji"
+ latin:keyIcon="!icon/emoji_key"
+ latin:keyActionFlags="noKeyPreview" />
+ <key-style
latin:styleName="settingsKeyStyle"
latin:code="!code/key_settings"
latin:keyIcon="!icon/settings_key"
diff --git a/java/res/xml-sw600dp/rows_10_10_7_symbols.xml b/java/res/xml-sw600dp/rows_10_10_7_symbols.xml
index 44c967c04..0e4710c37 100644
--- a/java/res/xml-sw600dp/rows_10_10_7_symbols.xml
+++ b/java/res/xml-sw600dp/rows_10_10_7_symbols.xml
@@ -43,7 +43,7 @@
latin:keyStyle="enterKeyStyle"
latin:keyWidth="fillRight" />
</Row>
- <Row
+ <Row
latin:keyWidth="9.0%p"
>
<Key
diff --git a/java/res/xml-sw768dp/key_styles_common.xml b/java/res/xml-sw768dp/key_styles_common.xml
index e69bc3020..7c0a82a71 100644
--- a/java/res/xml-sw768dp/key_styles_common.xml
+++ b/java/res/xml-sw768dp/key_styles_common.xml
@@ -110,6 +110,11 @@
latin:keyActionFlags="noKeyPreview|altCodeWhileTyping|enableLongPress"
latin:altCode="!code/key_space" />
<key-style
+ latin:styleName="emojiKeyStyle"
+ latin:code="!code/key_emoji"
+ latin:keyIcon="!icon/emoji_key"
+ latin:keyActionFlags="noKeyPreview" />
+ <key-style
latin:styleName="settingsKeyStyle"
latin:code="!code/key_settings"
latin:keyIcon="!icon/settings_key"
diff --git a/java/res/xml/key_styles_common.xml b/java/res/xml/key_styles_common.xml
index 6590d0a4c..355455e3b 100644
--- a/java/res/xml/key_styles_common.xml
+++ b/java/res/xml/key_styles_common.xml
@@ -126,6 +126,11 @@
latin:keyActionFlags="noKeyPreview|altCodeWhileTyping|enableLongPress"
latin:altCode="!code/key_space" />
<key-style
+ latin:styleName="emojiKeyStyle"
+ latin:code="!code/key_emoji"
+ latin:keyIcon="!icon/emoji_key"
+ latin:keyActionFlags="noKeyPreview" />
+ <key-style
latin:styleName="tabKeyStyle"
latin:code="!code/key_tab"
latin:keyIcon="!icon/tab_key"
diff --git a/java/src/com/android/inputmethod/keyboard/internal/KeyboardCodesSet.java b/java/src/com/android/inputmethod/keyboard/internal/KeyboardCodesSet.java
index 69ffb4c75..dc815e57d 100644
--- a/java/src/com/android/inputmethod/keyboard/internal/KeyboardCodesSet.java
+++ b/java/src/com/android/inputmethod/keyboard/internal/KeyboardCodesSet.java
@@ -53,6 +53,7 @@ public final class KeyboardCodesSet {
"key_action_previous",
"key_shift_enter",
"key_language_switch",
+ "key_emoji",
"key_unspecified",
"key_left_parenthesis",
"key_right_parenthesis",
@@ -89,6 +90,7 @@ public final class KeyboardCodesSet {
Constants.CODE_ACTION_PREVIOUS,
Constants.CODE_SHIFT_ENTER,
Constants.CODE_LANGUAGE_SWITCH,
+ Constants.CODE_EMOJI,
Constants.CODE_UNSPECIFIED,
CODE_LEFT_PARENTHESIS,
CODE_RIGHT_PARENTHESIS,
@@ -116,6 +118,7 @@ public final class KeyboardCodesSet {
DEFAULT[12],
DEFAULT[13],
DEFAULT[14],
+ DEFAULT[15],
CODE_RIGHT_PARENTHESIS,
CODE_LEFT_PARENTHESIS,
CODE_GREATER_THAN_SIGN,
diff --git a/java/src/com/android/inputmethod/keyboard/internal/KeyboardIconsSet.java b/java/src/com/android/inputmethod/keyboard/internal/KeyboardIconsSet.java
index 4e3f7618b..336db186e 100644
--- a/java/src/com/android/inputmethod/keyboard/internal/KeyboardIconsSet.java
+++ b/java/src/com/android/inputmethod/keyboard/internal/KeyboardIconsSet.java
@@ -56,6 +56,7 @@ public final class KeyboardIconsSet {
"language_switch_key", R.styleable.Keyboard_iconLanguageSwitchKey,
"zwnj_key", R.styleable.Keyboard_iconZwnjKey,
"zwj_key", R.styleable.Keyboard_iconZwjKey,
+ "emoji_key", R.styleable.Keyboard_iconEmojiKey,
};
private static int NUM_ICONS = NAMES_AND_ATTR_IDS.length / 2;
diff --git a/java/src/com/android/inputmethod/keyboard/internal/KeyboardTextsSet.java b/java/src/com/android/inputmethod/keyboard/internal/KeyboardTextsSet.java
index 7bb7442f3..b55e19d52 100644
--- a/java/src/com/android/inputmethod/keyboard/internal/KeyboardTextsSet.java
+++ b/java/src/com/android/inputmethod/keyboard/internal/KeyboardTextsSet.java
@@ -3151,7 +3151,7 @@ public final class KeyboardTextsSet {
/* 7 */ "\u00E7",
};
- /* Language zz: No language */
+ /* Language zz: Alphabet */
private static final String[] LANGUAGE_zz = {
// U+00E0: "à" LATIN SMALL LETTER A WITH GRAVE
// U+00E1: "á" LATIN SMALL LETTER A WITH ACUTE
@@ -3324,7 +3324,7 @@ public final class KeyboardTextsSet {
"uk", LANGUAGE_uk, /* Ukrainian */
"vi", LANGUAGE_vi, /* Vietnamese */
"zu", LANGUAGE_zu, /* Zulu */
- "zz", LANGUAGE_zz, /* No language */
+ "zz", LANGUAGE_zz, /* Alphabet */
};
static {
diff --git a/java/src/com/android/inputmethod/latin/Constants.java b/java/src/com/android/inputmethod/latin/Constants.java
index f91a21c7a..8aec03f71 100644
--- a/java/src/com/android/inputmethod/latin/Constants.java
+++ b/java/src/com/android/inputmethod/latin/Constants.java
@@ -187,6 +187,7 @@ public final class Constants {
public static final int CODE_ACTION_NEXT = -8;
public static final int CODE_ACTION_PREVIOUS = -9;
public static final int CODE_LANGUAGE_SWITCH = -10;
+ public static final int CODE_EMOJI = -11;
public static final int CODE_SHIFT_ENTER = -12;
// Code value representing the code is not specified.
public static final int CODE_UNSPECIFIED = -13;
@@ -207,6 +208,7 @@ public final class Constants {
case CODE_ACTION_NEXT: return "actionNext";
case CODE_ACTION_PREVIOUS: return "actionPrevious";
case CODE_LANGUAGE_SWITCH: return "languageSwitch";
+ case CODE_EMOJI: return "emoji";
case CODE_SHIFT_ENTER: return "shiftEnter";
case CODE_UNSPECIFIED: return "unspec";
case CODE_TAB: return "tab";
diff --git a/java/src/com/android/inputmethod/latin/InputView.java b/java/src/com/android/inputmethod/latin/InputView.java
index 5359c8185..81ccf83d8 100644
--- a/java/src/com/android/inputmethod/latin/InputView.java
+++ b/java/src/com/android/inputmethod/latin/InputView.java
@@ -24,7 +24,7 @@ import android.view.View;
import android.widget.LinearLayout;
public final class InputView extends LinearLayout {
- private View mSuggestionStripContainer;
+ private View mSuggestionStripView;
private View mKeyboardView;
private int mKeyboardTopPadding;
@@ -33,33 +33,29 @@ public final class InputView extends LinearLayout {
private final Rect mEventForwardingRect = new Rect();
private final Rect mEventReceivingRect = new Rect();
- public InputView(Context context, AttributeSet attrs) {
+ public InputView(final Context context, final AttributeSet attrs) {
super(context, attrs, 0);
}
- public void setKeyboardGeometry(int keyboardTopPadding) {
+ public void setKeyboardGeometry(final int keyboardTopPadding) {
mKeyboardTopPadding = keyboardTopPadding;
}
@Override
protected void onFinishInflate() {
- mSuggestionStripContainer = findViewById(R.id.suggestions_container);
+ mSuggestionStripView = findViewById(R.id.suggestion_strip_view);
mKeyboardView = findViewById(R.id.keyboard_view);
}
@Override
- public boolean dispatchTouchEvent(MotionEvent me) {
- if (mSuggestionStripContainer.getVisibility() == VISIBLE
- && mKeyboardView.getVisibility() == VISIBLE
- && forwardTouchEvent(me)) {
- return true;
+ public boolean dispatchTouchEvent(final MotionEvent me) {
+ if (mSuggestionStripView.getVisibility() != VISIBLE
+ || mKeyboardView.getVisibility() != VISIBLE) {
+ return super.dispatchTouchEvent(me);
}
- return super.dispatchTouchEvent(me);
- }
- // The touch events that hit the top padding of keyboard should be forwarded to
- // {@link SuggestionStripView}.
- private boolean forwardTouchEvent(MotionEvent me) {
+ // The touch events that hit the top padding of keyboard should be forwarded to
+ // {@link SuggestionStripView}.
final Rect rect = mInputViewRect;
this.getGlobalVisibleRect(rect);
final int x = (int)me.getX() + rect.left;
@@ -68,7 +64,7 @@ public final class InputView extends LinearLayout {
final Rect forwardingRect = mEventForwardingRect;
mKeyboardView.getGlobalVisibleRect(forwardingRect);
if (!mIsForwardingEvent && !forwardingRect.contains(x, y)) {
- return false;
+ return super.dispatchTouchEvent(me);
}
final int forwardingLimitY = forwardingRect.top + mKeyboardTopPadding;
@@ -93,11 +89,11 @@ public final class InputView extends LinearLayout {
}
if (!sendToTarget) {
- return false;
+ return super.dispatchTouchEvent(me);
}
final Rect receivingRect = mEventReceivingRect;
- mSuggestionStripContainer.getGlobalVisibleRect(receivingRect);
+ mSuggestionStripView.getGlobalVisibleRect(receivingRect);
final int translatedX = x - receivingRect.left;
final int translatedY;
if (y < forwardingLimitY) {
@@ -107,7 +103,7 @@ public final class InputView extends LinearLayout {
translatedY = y - receivingRect.top;
}
me.setLocation(translatedX, translatedY);
- mSuggestionStripContainer.dispatchTouchEvent(me);
+ mSuggestionStripView.dispatchTouchEvent(me);
return true;
}
}
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index 385e884ab..d970bca5e 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -152,7 +152,6 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
private View mExtractArea;
private View mKeyPreviewBackingView;
- private View mSuggestionsContainer;
private SuggestionStripView mSuggestionStripView;
// Never null
private SuggestedWords mSuggestedWords = SuggestedWords.EMPTY;
@@ -667,7 +666,6 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
mExtractArea = getWindow().getWindow().getDecorView()
.findViewById(android.R.id.extractArea);
mKeyPreviewBackingView = view.findViewById(R.id.key_preview_backing);
- mSuggestionsContainer = view.findViewById(R.id.suggestions_container);
mSuggestionStripView = (SuggestionStripView)view.findViewById(R.id.suggestion_strip_view);
if (mSuggestionStripView != null)
mSuggestionStripView.setListener(this, view);
@@ -1111,17 +1109,17 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
private void setSuggestionStripShownInternal(final boolean shown,
final boolean needsInputViewShown) {
// TODO: Modify this if we support suggestions with hard keyboard
- if (onEvaluateInputViewShown() && mSuggestionsContainer != null) {
+ if (onEvaluateInputViewShown() && mSuggestionStripView != null) {
final MainKeyboardView mainKeyboardView = mKeyboardSwitcher.getMainKeyboardView();
final boolean inputViewShown = (mainKeyboardView != null)
? mainKeyboardView.isShown() : false;
final boolean shouldShowSuggestions = shown
&& (needsInputViewShown ? inputViewShown : true);
if (isFullscreenMode()) {
- mSuggestionsContainer.setVisibility(
+ mSuggestionStripView.setVisibility(
shouldShowSuggestions ? View.VISIBLE : View.GONE);
} else {
- mSuggestionsContainer.setVisibility(
+ mSuggestionStripView.setVisibility(
shouldShowSuggestions ? View.VISIBLE : View.INVISIBLE);
}
}
@@ -1142,7 +1140,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
return 0;
}
final int keyboardHeight = mainKeyboardView.getHeight();
- final int suggestionsHeight = mSuggestionsContainer.getHeight();
+ final int suggestionsHeight = mSuggestionStripView.getHeight();
final int displayHeight = getResources().getDisplayMetrics().heightPixels;
final Rect rect = new Rect();
mKeyPreviewBackingView.getWindowVisibleDisplayFrame(rect);
@@ -1160,7 +1158,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
public void onComputeInsets(final InputMethodService.Insets outInsets) {
super.onComputeInsets(outInsets);
final MainKeyboardView mainKeyboardView = mKeyboardSwitcher.getMainKeyboardView();
- if (mainKeyboardView == null || mSuggestionsContainer == null) {
+ if (mainKeyboardView == null || mSuggestionStripView == null) {
return;
}
final int adjustedBackingHeight = getAdjustedBackingViewHeight();
@@ -1170,13 +1168,13 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
// be considered.
// See {@link android.inputmethodservice.InputMethodService#onComputeInsets}.
final int extractHeight = isFullscreenMode() ? mExtractArea.getHeight() : 0;
- final int suggestionsHeight = (mSuggestionsContainer.getVisibility() == View.GONE) ? 0
- : mSuggestionsContainer.getHeight();
+ final int suggestionsHeight = (mSuggestionStripView.getVisibility() == View.GONE) ? 0
+ : mSuggestionStripView.getHeight();
final int extraHeight = extractHeight + backingHeight + suggestionsHeight;
int visibleTopY = extraHeight;
// Need to set touchable region only if input view is being shown
if (mainKeyboardView.isShown()) {
- if (mSuggestionsContainer.getVisibility() == View.VISIBLE) {
+ if (mSuggestionStripView.getVisibility() == View.VISIBLE) {
visibleTopY -= suggestionsHeight;
}
final int touchY = mainKeyboardView.isShowingMoreKeysPanel() ? 0 : visibleTopY;
@@ -1512,6 +1510,9 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
case Constants.CODE_LANGUAGE_SWITCH:
handleLanguageSwitchKey();
break;
+ case Constants.CODE_EMOJI:
+ // TODO: Implement emoji keyboard switch.
+ break;
case Constants.CODE_ENTER:
final EditorInfo editorInfo = getCurrentInputEditorInfo();
final int imeOptionsActionId =