diff options
author | 2013-08-28 09:17:38 +0900 | |
---|---|---|
committer | 2013-08-29 19:48:34 +0900 | |
commit | d7791a93b0dee268a9e97f06fe5abcf6082e0ed1 (patch) | |
tree | 0ba3d4a87d248786ffbf378afec58ba1e150a02f /java/res | |
parent | b384cb28a14fe97533d5ac96b6fc319da50b1d10 (diff) | |
download | latinime-d7791a93b0dee268a9e97f06fe5abcf6082e0ed1.tar.gz latinime-d7791a93b0dee268a9e97f06fe5abcf6082e0ed1.tar.xz latinime-d7791a93b0dee268a9e97f06fe5abcf6082e0ed1.zip |
Support Emoji keyboard
Bug: 6370846
Change-Id: I33ce8f952799c89929996a226ac17731a953ec2a
Diffstat (limited to 'java/res')
-rw-r--r-- | java/res/layout/input_view.xml | 43 | ||||
-rw-r--r-- | java/res/values/emoji-categories.xml | 47 | ||||
-rw-r--r-- | java/res/values/themes-common.xml | 9 | ||||
-rw-r--r-- | java/res/values/themes-gb.xml | 2 | ||||
-rw-r--r-- | java/res/values/themes-ics.xml | 2 | ||||
-rw-r--r-- | java/res/xml-sw600dp/key_f2.xml | 2 | ||||
-rw-r--r-- | java/res/xml-sw600dp/key_styles_common.xml | 3 | ||||
-rw-r--r-- | java/res/xml-sw768dp/key_styles_common.xml | 3 | ||||
-rw-r--r-- | java/res/xml/key_styles_common.xml | 27 | ||||
-rw-r--r-- | java/res/xml/row_symbols4.xml | 2 |
10 files changed, 92 insertions, 48 deletions
diff --git a/java/res/layout/input_view.xml b/java/res/layout/input_view.xml index 78217b01a..86bd1e6c7 100644 --- a/java/res/layout/input_view.xml +++ b/java/res/layout/input_view.xml @@ -20,26 +20,33 @@ <com.android.inputmethod.latin.InputView xmlns:android="http://schemas.android.com/apk/res/android" - android:orientation="vertical" android:layout_width="match_parent" android:layout_height="wrap_content" android:gravity="bottom|center_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="@dimen/suggestions_strip_height" - 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+. --> - <com.android.inputmethod.keyboard.MainKeyboardView - android:id="@+id/keyboard_view" - android:layoutDirection="ltr" + android:orientation="vertical" > + <include + layout="@layout/emoji_keyboard_view" /> + <LinearLayout + android:id="@+id/main_keyboard_frame" android:layout_width="wrap_content" - android:layout_height="wrap_content" /> + android:layout_height="wrap_content" + android:orientation="vertical" > + <!-- 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="@dimen/suggestions_strip_height" + 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+. --> + <com.android.inputmethod.keyboard.MainKeyboardView + android:id="@+id/keyboard_view" + android:layoutDirection="ltr" + android:layout_width="wrap_content" + android:layout_height="wrap_content" /> + </LinearLayout> </com.android.inputmethod.latin.InputView> diff --git a/java/res/values/emoji-categories.xml b/java/res/values/emoji-categories.xml index 8f3dead88..ce82a8b40 100644 --- a/java/res/values/emoji-categories.xml +++ b/java/res/values/emoji-categories.xml @@ -36,26 +36,73 @@ name="emoji_nature" format="string" > + <item>2744</item> <!-- SNOWFLAKE --> </array> <array name="emoji_symbols" format="string" > + <item>2460</item> <!-- CIRCLED DIGIT ONE --> + <item>2461</item> <!-- CIRCLED DIGIT TWO --> + <item>2462</item> <!-- CIRCLED DIGIT THREE --> + <item>2463</item> <!-- CIRCLED DIGIT FOUR --> + <item>2464</item> <!-- CIRCLED DIGIT FIVE --> + <item>2465</item> <!-- CIRCLED DIGIT SIX --> + <item>2466</item> <!-- CIRCLED DIGIT SEVEN --> + <item>2467</item> <!-- CIRCLED DIGIT EIGHT --> + <item>2468</item> <!-- CIRCLED DIGIT NINE --> + <item>2469</item> <!-- CIRCLED DIGIT TEN --> + <item>00ae</item> <!-- REGISTERED SIGN --> + <item>00a9</item> <!-- COPYRIGHT SIGN --> + <item>2122</item> <!-- TRADE MARK SIGN --> + <item>2734</item> <!-- EIGHT POINTED BLACK STAR --> + <item>2733</item> <!-- EIGHT POINTED PINWHEEL STAR --> + <item>2716</item> <!-- HEAVY MULTIPLICATION MARK --> + <item>2195</item> <!-- UP DOWN ARROW --> + <item>2197</item> <!-- NORTH EAST ARROW --> + <item>27a1</item> <!-- BLACK RIGHTWARDS ARROW --> + <item>2198</item> <!-- SOUTH EAST ARROW --> + <item>2199</item> <!-- SOUTH WEST ARROW --> + <item>2196</item> <!-- NORTH EAST ARROW --> + <item>2194</item> <!-- LEFT RIGHT ARROW --> + <item>25c0</item> <!-- BLACK LEFT-POINTING TRIANGLE --> + <item>25b6</item> <!-- BLACK ROGHT-POINTING TRIANGLE --> + <item>2747</item> <!-- SPARKLE --> + <item>25aa</item> <!-- BLACK SMALL SQUARE --> + <item>203c</item> <!-- DOUBLE EXCLAMATION MARK --> + <item>2660</item> <!-- BLACK SPADE SUIT --> + <item>2665</item> <!-- BLACK HEART SUIT --> + <item>2663</item> <!-- BLACK CLUB SUIT --> + <item>2666</item> <!-- BLACK DIAMOND SUIT --> + <item>21a9</item> <!-- LEFTWARDS ARROW WITH HOOK --> + <item>21aa</item> <!-- RIGHTWARDS ARROW WITH HOOK --> </array> <array name="emoji_faces" format="string" > + <item>270C</item> <!-- VICTORY HAND --> + <item>2764</item> <!-- HEAVY BLACK HEART --> </array> <array name="emoji_objects" format="string" > + <item>260e</item> <!-- BLACK TELEPHONE --> + <item>2709</item> <!-- ENVELOPE --> + <item>2712</item> <!-- BLACK NIB --> + <item>270f</item> <!-- PENCIL --> + <item>2702</item> <!-- BLACK SCISSORS --> + <item>2669</item> <!-- QUARTER NOTE --> + <item>266a</item> <!-- EIGHTH NOTE --> + <item>266c</item> <!-- BEAMED SIXTEENTH NOTES --> </array> <array name="emoji_places" format="string" > + <item>2708</item> <!-- AIRPLANE --> + <item>2668</item> <!-- HOT SPRINGS --> </array> <array name="emoji_emoticons" diff --git a/java/res/values/themes-common.xml b/java/res/values/themes-common.xml index 473a1257e..8e9cfc90b 100644 --- a/java/res/values/themes-common.xml +++ b/java/res/values/themes-common.xml @@ -104,7 +104,14 @@ <style name="MainKeyboardView" parent="KeyboardView" /> - <style name="EmojiKeyboardView" /> + <!-- Though {@link EmojiKeyboardView} doesn't extend {@link KeyboardView}, some views inside it, + for instance delete button, need themed {@link KeyboardView} attributes. --> + <style + name="EmojiKeyboardView" + parent="KeyboardView" + > + <item name="emojiTabLabelColor">@color/emoji_tab_label_color_ics</item> + </style> <style name="MoreKeysKeyboard" /> <style name="MoreKeysKeyboardView" diff --git a/java/res/values/themes-gb.xml b/java/res/values/themes-gb.xml index d39003d94..7f8dd235b 100644 --- a/java/res/values/themes-gb.xml +++ b/java/res/values/themes-gb.xml @@ -96,6 +96,8 @@ <item name="spacebarTextColor">@color/spacebar_text_color_gb</item> <item name="spacebarTextShadowColor">@color/spacebar_text_shadow_color_gb</item> </style> + <!-- Though {@link EmojiKeyboardView} doesn't extend {@link KeyboardView}, some views inside it, + for instance delete button, need themed {@link KeyboardView} attributes. --> <style name="EmojiKeyboardView.GB" parent="KeyboardView.GB" diff --git a/java/res/values/themes-ics.xml b/java/res/values/themes-ics.xml index f5b74838b..f3b6b1321 100644 --- a/java/res/values/themes-ics.xml +++ b/java/res/values/themes-ics.xml @@ -97,6 +97,8 @@ <item name="spacebarTextColor">@color/spacebar_text_color_ics</item> <item name="spacebarTextShadowColor">@color/spacebar_text_shadow_color_ics</item> </style> + <!-- Though {@link EmojiKeyboardView} doesn't extend {@link KeyboardView}, some views inside it, + for instance delete button, need themed {@link KeyboardView} attributes. --> <style name="EmojiKeyboardView.ICS" parent="KeyboardView.ICS" diff --git a/java/res/xml-sw600dp/key_f2.xml b/java/res/xml-sw600dp/key_f2.xml index ca3b30b54..56f233da9 100644 --- a/java/res/xml-sw600dp/key_f2.xml +++ b/java/res/xml-sw600dp/key_f2.xml @@ -39,7 +39,7 @@ </case> <default> <Key - latin:keyStyle="smileyKeyStyle" /> + latin:keyStyle="emojiKeyStyle" /> </default> </switch> </merge> diff --git a/java/res/xml-sw600dp/key_styles_common.xml b/java/res/xml-sw600dp/key_styles_common.xml index fc9342b91..3b20281be 100644 --- a/java/res/xml-sw600dp/key_styles_common.xml +++ b/java/res/xml-sw600dp/key_styles_common.xml @@ -123,7 +123,8 @@ latin:styleName="emojiKeyStyle" latin:code="!code/key_emoji" latin:keyIcon="!icon/emoji_key" - latin:keyActionFlags="noKeyPreview" /> + latin:keyActionFlags="noKeyPreview" + latin:backgroundType="functional" /> <key-style latin:styleName="settingsKeyStyle" latin:code="!code/key_settings" diff --git a/java/res/xml-sw768dp/key_styles_common.xml b/java/res/xml-sw768dp/key_styles_common.xml index 538930948..5ee9ac591 100644 --- a/java/res/xml-sw768dp/key_styles_common.xml +++ b/java/res/xml-sw768dp/key_styles_common.xml @@ -113,7 +113,8 @@ latin:styleName="emojiKeyStyle" latin:code="!code/key_emoji" latin:keyIcon="!icon/emoji_key" - latin:keyActionFlags="noKeyPreview" /> + latin:keyActionFlags="noKeyPreview" + latin:backgroundType="functional" /> <key-style latin:styleName="settingsKeyStyle" latin:code="!code/key_settings" diff --git a/java/res/xml/key_styles_common.xml b/java/res/xml/key_styles_common.xml index dabe1e7eb..c1c2c3e06 100644 --- a/java/res/xml/key_styles_common.xml +++ b/java/res/xml/key_styles_common.xml @@ -67,30 +67,6 @@ latin:backgroundType="functional" /> <include latin:keyboardLayout="@xml/key_styles_enter" /> - <switch> - <!-- Shift + Enter in textMultiLine field. --> - <case - latin:isMultiLine="true" - latin:keyboardLayoutSetElement="alphabetManualShifted|alphabetShiftLockShifted" - > - <key-style - latin:styleName="enterKeyStyle" - latin:parentStyle="shiftEnterKeyStyle" /> - </case> - <!-- Smiley in textShortMessage field. - Overrides common enter key style. --> - <case - latin:mode="im" - > - <key-style - latin:styleName="enterKeyStyle" - latin:keyLabel=":-)" - latin:keyOutputText=":-) " - latin:keyLabelFlags="hasPopupHint" - latin:moreKeys="!text/more_keys_for_smiley" - latin:backgroundType="functional" /> - </case> - </switch> <key-style latin:styleName="spaceKeyStyle" latin:code="!code/key_space" @@ -129,7 +105,8 @@ latin:styleName="emojiKeyStyle" latin:code="!code/key_emoji" latin:keyIcon="!icon/emoji_key" - latin:keyActionFlags="noKeyPreview" /> + latin:keyActionFlags="noKeyPreview" + latin:backgroundType="functional" /> <key-style latin:styleName="tabKeyStyle" latin:code="!code/key_tab" diff --git a/java/res/xml/row_symbols4.xml b/java/res/xml/row_symbols4.xml index 5c15da6a5..bea139aba 100644 --- a/java/res/xml/row_symbols4.xml +++ b/java/res/xml/row_symbols4.xml @@ -50,7 +50,7 @@ latin:keyboardLayout="@xml/key_symbols_period" latin:backgroundType="functional" /> <Key - latin:keyStyle="enterKeyStyle" + latin:keyStyle="emojiKeyStyle" latin:keyWidth="fillRight" /> </Row> </merge> |