am cc38bfb5: Merge "Add emoji icon and code as a groundwork"

* commit 'cc38bfb5d3bc48fae1a789d35441e96fd3d0d63c':
  Add emoji icon and code as a groundwork
main
Tadashi G. Takaoka 2013-08-06 09:29:16 -07:00 committed by Android Git Automerger
commit 7fbda5f047
18 changed files with 29 additions and 1 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

@ -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">

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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"

View File

@ -43,7 +43,7 @@
latin:keyStyle="enterKeyStyle"
latin:keyWidth="fillRight" />
</Row>
<Row
<Row
latin:keyWidth="9.0%p"
>
<Key

View File

@ -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"

View File

@ -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"

View File

@ -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,

View File

@ -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;

View File

@ -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";

View File

@ -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 =