am cc38bfb5
: Merge "Add emoji icon and code as a groundwork"
* commit 'cc38bfb5d3bc48fae1a789d35441e96fd3d0d63c': Add emoji icon and code as a groundwork
This commit is contained in:
commit
7fbda5f047
18 changed files with 29 additions and 1 deletions
BIN
java/res/drawable-hdpi/ic_emoji_dark.png
Normal file
BIN
java/res/drawable-hdpi/ic_emoji_dark.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.8 KiB |
BIN
java/res/drawable-hdpi/ic_emoji_light.png
Normal file
BIN
java/res/drawable-hdpi/ic_emoji_light.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.8 KiB |
BIN
java/res/drawable-mdpi/ic_emoji_dark.png
Normal file
BIN
java/res/drawable-mdpi/ic_emoji_dark.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.2 KiB |
BIN
java/res/drawable-mdpi/ic_emoji_light.png
Normal file
BIN
java/res/drawable-mdpi/ic_emoji_light.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
BIN
java/res/drawable-xhdpi/ic_emoji_dark.png
Normal file
BIN
java/res/drawable-xhdpi/ic_emoji_dark.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.6 KiB |
BIN
java/res/drawable-xhdpi/ic_emoji_light.png
Normal file
BIN
java/res/drawable-xhdpi/ic_emoji_light.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.5 KiB |
|
@ -216,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">
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -119,6 +119,11 @@
|
|||
latin:keyIcon="!icon/language_switch_key"
|
||||
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"
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
latin:keyStyle="enterKeyStyle"
|
||||
latin:keyWidth="fillRight" />
|
||||
</Row>
|
||||
<Row
|
||||
<Row
|
||||
latin:keyWidth="9.0%p"
|
||||
>
|
||||
<Key
|
||||
|
|
|
@ -109,6 +109,11 @@
|
|||
latin:keyIcon="!icon/language_switch_key"
|
||||
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"
|
||||
|
|
|
@ -125,6 +125,11 @@
|
|||
latin:keyIcon="!icon/language_switch_key"
|
||||
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"
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -1510,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 =
|
||||
|
|
Loading…
Reference in a new issue