Add Right-To-Left delete icon

Bug: 4161983
Bug: 4170083
Change-Id: Ife9a933353e97f3c7c3ede47623dc7528160f3c5
main
Tadashi G. Takaoka 2011-07-12 20:42:26 -07:00
parent 656a35f9df
commit 886246b19a
18 changed files with 53 additions and 45 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 718 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 812 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 812 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -157,6 +157,7 @@
<attr name="iconToSymbolKey" format="reference" /> <attr name="iconToSymbolKey" format="reference" />
<attr name="iconToSymbolKeyWithShortcut" format="reference" /> <attr name="iconToSymbolKeyWithShortcut" format="reference" />
<attr name="iconDeleteKey" format="reference" /> <attr name="iconDeleteKey" format="reference" />
<attr name="iconDeleteRtlKey" format="reference" />
<attr name="iconSettingsKey" format="reference" /> <attr name="iconSettingsKey" format="reference" />
<attr name="iconShortcutKey" format="reference" /> <attr name="iconShortcutKey" format="reference" />
<attr name="iconSpaceKey" format="reference" /> <attr name="iconSpaceKey" format="reference" />
@ -218,25 +219,26 @@
<enum name="iconToSymbolKey" value="2" /> <enum name="iconToSymbolKey" value="2" />
<enum name="iconToSymbolKeyWithShortcut" value="3" /> <enum name="iconToSymbolKeyWithShortcut" value="3" />
<enum name="iconDeleteKey" value="4" /> <enum name="iconDeleteKey" value="4" />
<enum name="iconSettingsKey" value="5" /> <enum name="iconDeleteRtlKey" value="5" />
<enum name="iconShortcutKey" value="6" /> <enum name="iconSettingsKey" value="6" />
<enum name="iconSpaceKey" value="7" /> <enum name="iconShortcutKey" value="7" />
<enum name="iconReturnKey" value="8" /> <enum name="iconSpaceKey" value="8" />
<enum name="iconSearchKey" value="9" /> <enum name="iconReturnKey" value="9" />
<enum name="iconTabKey" value="10" /> <enum name="iconSearchKey" value="10" />
<enum name="iconTabKey" value="11" />
</attr> </attr>
<!-- Shift key icon for shifted state --> <!-- Shift key icon for shifted state -->
<attr name="keyIconShifted" format="enum"> <attr name="keyIconShifted" format="enum">
<!-- This should be aligned with KeyboardIcons.ICON_SHIFTED_* --> <!-- This should be aligned with KeyboardIcons.ICON_SHIFTED_* -->
<enum name="iconShiftedShiftKey" value="11" /> <enum name="iconShiftedShiftKey" value="12" />
</attr> </attr>
<!-- The icon to show in the popup preview. --> <!-- The icon to show in the popup preview. -->
<attr name="keyIconPreview" format="enum"> <attr name="keyIconPreview" format="enum">
<!-- This should be aligned with KeyboardIcons.ICON_PREVIEW_* --> <!-- This should be aligned with KeyboardIcons.ICON_PREVIEW_* -->
<enum name="iconPreviewSpaceKey" value="12" /> <enum name="iconPreviewSpaceKey" value="13" />
<enum name="iconPreviewTabKey" value="13" /> <enum name="iconPreviewTabKey" value="14" />
<enum name="iconPreviewSettingsKey" value="14" /> <enum name="iconPreviewSettingsKey" value="15" />
<enum name="iconPreviewShortcutKey" value="15" /> <enum name="iconPreviewShortcutKey" value="16" />
</attr> </attr>
<!-- The key style to specify a set of key attributes defined by <key_style/> --> <!-- The key style to specify a set of key attributes defined by <key_style/> -->
<attr name="keyStyle" format="string" /> <attr name="keyStyle" format="string" />

View File

@ -18,12 +18,14 @@
<style name="KeyboardIcons.Black"> <style name="KeyboardIcons.Black">
<!-- Keyboard icons --> <!-- Keyboard icons -->
<!-- TODO: The following holo icon for phone (drawable-hdpi and drawable-xhdpi) are too <!-- TODO: The following holo icon for phone (drawable-hdpi and drawable-xhdpi) are too
large for phone. ambiguous.
sym_bkeyboard_voice_off sym_bkeyboard_voice_off
--> -->
<item name="iconShiftKey">@drawable/sym_bkeyboard_shift</item> <item name="iconShiftKey">@drawable/sym_bkeyboard_shift</item>
<item name="iconToSymbolKeyWithShortcut">@drawable/sym_bkeyboard_123_mic</item> <item name="iconToSymbolKeyWithShortcut">@drawable/sym_bkeyboard_123_mic</item>
<item name="iconDeleteKey">@drawable/sym_bkeyboard_delete</item> <item name="iconDeleteKey">@drawable/sym_bkeyboard_delete</item>
<!-- TODO: update this icon drawable -->
<item name="iconDeleteRtlKey">@drawable/sym_bkeyboard_delete_rtl</item>
<item name="iconSettingsKey">@drawable/sym_bkeyboard_settings</item> <item name="iconSettingsKey">@drawable/sym_bkeyboard_settings</item>
<item name="iconShortcutKey">@drawable/sym_bkeyboard_mic</item> <item name="iconShortcutKey">@drawable/sym_bkeyboard_mic</item>
<item name="iconSpaceKey">@drawable/sym_bkeyboard_space</item> <item name="iconSpaceKey">@drawable/sym_bkeyboard_space</item>

View File

@ -17,27 +17,14 @@
<resources> <resources>
<style name="KeyboardIcons.IceCreamSandwich"> <style name="KeyboardIcons.IceCreamSandwich">
<!-- Keyboard icons --> <!-- Keyboard icons -->
<!-- TODO: The following holo icon for phone (drawable-hdpi and drawable-xhdpi) are too
large for phone.
sym_keyboard_shift_holo
sym_keyboard_shift_locked_holo
sym_keyboard_delete_holo,
sym_keyboard_settings_holo
sym_keyboard_voice_holo
sym_keyboard_voice_holo_off
sym_keyboard_space_holo
sym_keyboard_return_holo
sym_keyboard_tab_holo
-->
<!-- TODO: The following holo icon for phone (drawable-hdpi and drawable-xhdpi) are missing. <!-- TODO: The following holo icon for phone (drawable-hdpi and drawable-xhdpi) are missing.
sym_keyboard_123_mic_holo sym_keyboard_123_mic_holo
sym_keyboard_search_holo
sym_keyboard_feedback_tab_holo
sym_keyboard_feedback_voice_holo
--> -->
<item name="iconShiftKey">@drawable/sym_keyboard_shift_holo</item> <item name="iconShiftKey">@drawable/sym_keyboard_shift_holo</item>
<item name="iconToSymbolKeyWithShortcut">@drawable/sym_keyboard_123_mic_holo</item> <item name="iconToSymbolKeyWithShortcut">@drawable/sym_keyboard_123_mic_holo</item>
<item name="iconDeleteKey">@drawable/sym_keyboard_delete_holo</item> <item name="iconDeleteKey">@drawable/sym_keyboard_delete_holo</item>
<!-- TODO: update this icon drawable -->
<item name="iconDeleteRtlKey">@drawable/sym_keyboard_delete_rtl_holo</item>
<item name="iconSettingsKey">@drawable/sym_keyboard_settings_holo</item> <item name="iconSettingsKey">@drawable/sym_keyboard_settings_holo</item>
<item name="iconShortcutKey">@drawable/sym_keyboard_voice_holo</item> <item name="iconShortcutKey">@drawable/sym_keyboard_voice_holo</item>
<item name="iconSpaceKey">@drawable/sym_keyboard_space_holo</item> <item name="iconSpaceKey">@drawable/sym_keyboard_space_holo</item>

View File

@ -20,6 +20,8 @@
<item name="iconShiftKey">@drawable/sym_keyboard_shift</item> <item name="iconShiftKey">@drawable/sym_keyboard_shift</item>
<item name="iconToSymbolKeyWithShortcut">@drawable/sym_keyboard_123_mic</item> <item name="iconToSymbolKeyWithShortcut">@drawable/sym_keyboard_123_mic</item>
<item name="iconDeleteKey">@drawable/sym_keyboard_delete</item> <item name="iconDeleteKey">@drawable/sym_keyboard_delete</item>
<!-- TODO: update this icon drawable -->
<item name="iconDeleteRtlKey">@drawable/sym_keyboard_delete_rtl</item>
<item name="iconSettingsKey">@drawable/sym_keyboard_settings</item> <item name="iconSettingsKey">@drawable/sym_keyboard_settings</item>
<item name="iconShortcutKey">@drawable/sym_keyboard_mic</item> <item name="iconShortcutKey">@drawable/sym_keyboard_mic</item>
<item name="iconSpaceKey">@drawable/sym_keyboard_space</item> <item name="iconSpaceKey">@drawable/sym_keyboard_space</item>

View File

@ -59,12 +59,24 @@
latin:keyIconShifted="iconShiftedShiftKey" latin:keyIconShifted="iconShiftedShiftKey"
latin:parentStyle="functionalKeyStyle" latin:parentStyle="functionalKeyStyle"
latin:isSticky="true" /> latin:isSticky="true" />
<key-style <switch>
latin:styleName="deleteKeyStyle" <case latin:localeCode="ar|iw">
latin:code="@integer/key_delete" <key-style
latin:keyIcon="iconDeleteKey" latin:styleName="deleteKeyStyle"
latin:parentStyle="functionalKeyStyle" latin:code="@integer/key_delete"
latin:isRepeatable="true" /> latin:keyIcon="iconDeleteRtlKey"
latin:parentStyle="functionalKeyStyle"
latin:isRepeatable="true" />
</case>
<default>
<key-style
latin:styleName="deleteKeyStyle"
latin:code="@integer/key_delete"
latin:keyIcon="iconDeleteKey"
latin:parentStyle="functionalKeyStyle"
latin:isRepeatable="true" />
</default>
</switch>
<!-- Return key style --> <!-- Return key style -->
<switch> <switch>
<case <case

View File

@ -34,21 +34,22 @@ public class KeyboardIconsSet {
private static final int ICON_TO_SYMBOL_KEY = 2; private static final int ICON_TO_SYMBOL_KEY = 2;
private static final int ICON_TO_SYMBOL_KEY_WITH_SHORTCUT = 3; private static final int ICON_TO_SYMBOL_KEY_WITH_SHORTCUT = 3;
private static final int ICON_DELETE_KEY = 4; private static final int ICON_DELETE_KEY = 4;
private static final int ICON_SETTINGS_KEY = 5; private static final int ICON_DELETE_RTL_KEY = 5;
private static final int ICON_SHORTCUT_KEY = 6; private static final int ICON_SETTINGS_KEY = 6;
private static final int ICON_SPACE_KEY = 7; private static final int ICON_SHORTCUT_KEY = 7;
private static final int ICON_RETURN_KEY = 8; private static final int ICON_SPACE_KEY = 8;
private static final int ICON_SEARCH_KEY = 9; private static final int ICON_RETURN_KEY = 9;
private static final int ICON_TAB_KEY = 10; private static final int ICON_SEARCH_KEY = 10;
private static final int ICON_TAB_KEY = 11;
// This should be aligned with Keyboard.keyIconShifted enum. // This should be aligned with Keyboard.keyIconShifted enum.
private static final int ICON_SHIFTED_SHIFT_KEY = 11; private static final int ICON_SHIFTED_SHIFT_KEY = 12;
// This should be aligned with Keyboard.keyIconPreview enum. // This should be aligned with Keyboard.keyIconPreview enum.
private static final int ICON_PREVIEW_SPACE_KEY = 12; private static final int ICON_PREVIEW_SPACE_KEY = 13;
private static final int ICON_PREVIEW_TAB_KEY = 13; private static final int ICON_PREVIEW_TAB_KEY = 14;
private static final int ICON_PREVIEW_SETTINGS_KEY = 14; private static final int ICON_PREVIEW_SETTINGS_KEY = 15;
private static final int ICON_PREVIEW_SHORTCUT_KEY = 15; private static final int ICON_PREVIEW_SHORTCUT_KEY = 16;
private static final int ICON_LAST = 15; private static final int ICON_LAST = 16;
private final Drawable mIcons[] = new Drawable[ICON_LAST + 1]; private final Drawable mIcons[] = new Drawable[ICON_LAST + 1];
@ -62,6 +63,8 @@ public class KeyboardIconsSet {
return ICON_TO_SYMBOL_KEY_WITH_SHORTCUT; return ICON_TO_SYMBOL_KEY_WITH_SHORTCUT;
case R.styleable.Keyboard_iconDeleteKey: case R.styleable.Keyboard_iconDeleteKey:
return ICON_DELETE_KEY; return ICON_DELETE_KEY;
case R.styleable.Keyboard_iconDeleteRtlKey:
return ICON_DELETE_RTL_KEY;
case R.styleable.Keyboard_iconSettingsKey: case R.styleable.Keyboard_iconSettingsKey:
return ICON_SETTINGS_KEY; return ICON_SETTINGS_KEY;
case R.styleable.Keyboard_iconShortcutKey: case R.styleable.Keyboard_iconShortcutKey: