Merge "Add ZWNJ and ZWJ icons"

main
Tadashi G. Takaoka 2012-03-25 23:46:29 -07:00 committed by Android (Google) Code Review
commit 27bb631f4c
14 changed files with 33 additions and 11 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 973 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 961 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 733 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 704 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -224,6 +224,8 @@
<attr name="iconDisabledShortcutKey" format="reference" /> <attr name="iconDisabledShortcutKey" format="reference" />
<attr name="iconPreviewTabKey" format="reference" /> <attr name="iconPreviewTabKey" format="reference" />
<attr name="iconLanguageSwitchKey" format="reference" /> <attr name="iconLanguageSwitchKey" format="reference" />
<attr name="iconZwnjKey" format="reference" />
<attr name="iconZwjKey" format="reference" />
</declare-styleable> </declare-styleable>
<declare-styleable name="Keyboard_Key"> <declare-styleable name="Keyboard_Key">
@ -309,6 +311,8 @@
<enum name="iconSpaceKeyForNumberLayout" value="10" /> <enum name="iconSpaceKeyForNumberLayout" value="10" />
<enum name="iconShiftKeyShifted" value="11" /> <enum name="iconShiftKeyShifted" value="11" />
<enum name="iconLanguageSwitchKey" value="14" /> <enum name="iconLanguageSwitchKey" value="14" />
<enum name="iconZwnjKey" value="15" />
<enum name="iconZwjKey" value="16" />
</attr> </attr>
<!-- The icon for disabled key --> <!-- The icon for disabled key -->
<attr name="keyIconDisabled" format="enum"> <attr name="keyIconDisabled" format="enum">

View File

@ -36,5 +36,8 @@
<item name="iconPreviewTabKey">@drawable/sym_keyboard_feedback_tab</item> <item name="iconPreviewTabKey">@drawable/sym_keyboard_feedback_tab</item>
<!-- TODO: Needs dedicated black theme globe icon --> <!-- TODO: Needs dedicated black theme globe icon -->
<item name="iconLanguageSwitchKey">@drawable/sym_keyboard_language_switch</item> <item name="iconLanguageSwitchKey">@drawable/sym_keyboard_language_switch</item>
<!-- 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>
</style> </style>
</resources> </resources>

View File

@ -34,5 +34,7 @@
<item name="iconDisabledShortcutKey">@drawable/sym_keyboard_voice_off_holo</item> <item name="iconDisabledShortcutKey">@drawable/sym_keyboard_voice_off_holo</item>
<item name="iconPreviewTabKey">@drawable/sym_keyboard_feedback_tab</item> <item name="iconPreviewTabKey">@drawable/sym_keyboard_feedback_tab</item>
<item name="iconLanguageSwitchKey">@drawable/sym_keyboard_language_switch</item> <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>
</style> </style>
</resources> </resources>

View File

@ -32,5 +32,8 @@
<item name="iconDisabledShortcutKey">@drawable/sym_keyboard_voice_off_holo</item> <item name="iconDisabledShortcutKey">@drawable/sym_keyboard_voice_off_holo</item>
<item name="iconPreviewTabKey">@drawable/sym_keyboard_feedback_tab</item> <item name="iconPreviewTabKey">@drawable/sym_keyboard_feedback_tab</item>
<item name="iconLanguageSwitchKey">@drawable/sym_keyboard_language_switch</item> <item name="iconLanguageSwitchKey">@drawable/sym_keyboard_language_switch</item>
<!-- 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>
</style> </style>
</resources> </resources>

View File

@ -78,11 +78,14 @@
latin:styleName="spaceKeyStyle" latin:styleName="spaceKeyStyle"
latin:code="@integer/key_space" latin:code="@integer/key_space"
latin:keyActionFlags="noKeyPreview" /> latin:keyActionFlags="noKeyPreview" />
<!-- U+200C: ZERO WIDTH NON-JOINER
U+200D: ZERO WIDTH JOINER -->
<key-style <key-style
latin:styleName="zwnjKeyStyle" latin:styleName="zwnjKeyStyle"
latin:keyLabel="&#x200C;" latin:code="0x200C"
latin:moreKeys="&#x200D;" latin:moreKeys="\@icon/zwjKey|&#x200D;"
latin:keyLabelFlags="hasPopupHint" /> latin:keyLabelFlags="hasPopupHint"
latin:keyActionFlags="noKeyPreview" />
<key-style <key-style
latin:styleName="smileyKeyStyle" latin:styleName="smileyKeyStyle"
latin:keyLabel=":-)" latin:keyLabel=":-)"

View File

@ -77,11 +77,14 @@
latin:styleName="spaceKeyStyle" latin:styleName="spaceKeyStyle"
latin:code="@integer/key_space" latin:code="@integer/key_space"
latin:keyActionFlags="noKeyPreview" /> latin:keyActionFlags="noKeyPreview" />
<!-- U+200C: ZERO WIDTH NON-JOINER
U+200D: ZERO WIDTH JOINER -->
<key-style <key-style
latin:styleName="zwnjKeyStyle" latin:styleName="zwnjKeyStyle"
latin:keyLabel="&#x200C;" latin:code="0x200C"
latin:moreKeys="&#x200D;" latin:moreKeys="\@icon/zwjKey|&#x200D;"
latin:keyLabelFlags="hasPopupHint" /> latin:keyLabelFlags="hasPopupHint"
latin:keyActionFlags="noKeyPreview" />
<key-style <key-style
latin:styleName="smileyKeyStyle" latin:styleName="smileyKeyStyle"
latin:keyLabel=":-)" latin:keyLabel=":-)"

View File

@ -107,11 +107,15 @@
latin:code="@integer/key_space" latin:code="@integer/key_space"
latin:keyActionFlags="noKeyPreview|enableLongPress" latin:keyActionFlags="noKeyPreview|enableLongPress"
latin:backgroundType="functional" /> latin:backgroundType="functional" />
<!-- U+200C: ZERO WIDTH NON-JOINER
U+200D: ZERO WIDTH JOINER -->
<key-style <key-style
latin:styleName="zwnjKeyStyle" latin:styleName="zwnjKeyStyle"
latin:keyLabel="&#x200C;" latin:code="0x200C"
latin:moreKeys="&#x200D;" latin:keyIcon="iconZwnjKey"
latin:moreKeys="\@icon/zwjKey|&#x200D;"
latin:keyLabelFlags="hasPopupHint" latin:keyLabelFlags="hasPopupHint"
latin:keyActionFlags="noKeyPreview"
latin:backgroundType="functional" /> latin:backgroundType="functional" />
<key-style <key-style
latin:styleName="shortcutKeyStyle" latin:styleName="shortcutKeyStyle"
@ -129,8 +133,6 @@
latin:keyActionFlags="noKeyPreview|altCodeWhileTyping|enableLongPress" latin:keyActionFlags="noKeyPreview|altCodeWhileTyping|enableLongPress"
latin:altCode="@integer/key_space" latin:altCode="@integer/key_space"
latin:backgroundType="functional" /> latin:backgroundType="functional" />
<!-- U+200C: "" ZERO WIDTH NON-JOINER
U+200D: "" ZERO WIDTH JOINER -->
<key-style <key-style
latin:styleName="tabKeyStyle" latin:styleName="tabKeyStyle"
latin:code="@integer/key_tab" latin:code="@integer/key_tab"

View File

@ -30,7 +30,7 @@ public class KeyboardIconsSet {
// The value should be aligned with the enum value of Key.keyIcon. // The value should be aligned with the enum value of Key.keyIcon.
public static final int ICON_UNDEFINED = 0; public static final int ICON_UNDEFINED = 0;
private static final int NUM_ICONS = 14; private static final int NUM_ICONS = 16;
private final Drawable[] mIcons = new Drawable[NUM_ICONS + 1]; private final Drawable[] mIcons = new Drawable[NUM_ICONS + 1];
@ -58,6 +58,8 @@ public class KeyboardIconsSet {
addIconIdMap(12, "disabledShortcurKey", R.styleable.Keyboard_iconDisabledShortcutKey); addIconIdMap(12, "disabledShortcurKey", R.styleable.Keyboard_iconDisabledShortcutKey);
addIconIdMap(13, "previewTabKey", R.styleable.Keyboard_iconPreviewTabKey); addIconIdMap(13, "previewTabKey", R.styleable.Keyboard_iconPreviewTabKey);
addIconIdMap(14, "languageSwitchKey", R.styleable.Keyboard_iconLanguageSwitchKey); addIconIdMap(14, "languageSwitchKey", R.styleable.Keyboard_iconLanguageSwitchKey);
addIconIdMap(15, "zwnjKey", R.styleable.Keyboard_iconZwnjKey);
addIconIdMap(16, "zwjKey", R.styleable.Keyboard_iconZwjKey);
} }
private static void addIconIdMap(int iconId, String name, int attrId) { private static void addIconIdMap(int iconId, String name, int attrId) {