Add Right-To-Left delete icon
Bug: 4161983 Bug: 4170083 Change-Id: Ife9a933353e97f3c7c3ede47623dc7528160f3c5main
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 4.5 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 718 B |
After Width: | Height: | Size: 3.4 KiB |
After Width: | Height: | Size: 812 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 812 B |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 2.6 KiB |
After Width: | Height: | Size: 5.4 KiB |
After Width: | Height: | Size: 1.5 KiB |
|
@ -157,6 +157,7 @@
|
|||
<attr name="iconToSymbolKey" format="reference" />
|
||||
<attr name="iconToSymbolKeyWithShortcut" format="reference" />
|
||||
<attr name="iconDeleteKey" format="reference" />
|
||||
<attr name="iconDeleteRtlKey" format="reference" />
|
||||
<attr name="iconSettingsKey" format="reference" />
|
||||
<attr name="iconShortcutKey" format="reference" />
|
||||
<attr name="iconSpaceKey" format="reference" />
|
||||
|
@ -218,25 +219,26 @@
|
|||
<enum name="iconToSymbolKey" value="2" />
|
||||
<enum name="iconToSymbolKeyWithShortcut" value="3" />
|
||||
<enum name="iconDeleteKey" value="4" />
|
||||
<enum name="iconSettingsKey" value="5" />
|
||||
<enum name="iconShortcutKey" value="6" />
|
||||
<enum name="iconSpaceKey" value="7" />
|
||||
<enum name="iconReturnKey" value="8" />
|
||||
<enum name="iconSearchKey" value="9" />
|
||||
<enum name="iconTabKey" value="10" />
|
||||
<enum name="iconDeleteRtlKey" value="5" />
|
||||
<enum name="iconSettingsKey" value="6" />
|
||||
<enum name="iconShortcutKey" value="7" />
|
||||
<enum name="iconSpaceKey" value="8" />
|
||||
<enum name="iconReturnKey" value="9" />
|
||||
<enum name="iconSearchKey" value="10" />
|
||||
<enum name="iconTabKey" value="11" />
|
||||
</attr>
|
||||
<!-- Shift key icon for shifted state -->
|
||||
<attr name="keyIconShifted" format="enum">
|
||||
<!-- This should be aligned with KeyboardIcons.ICON_SHIFTED_* -->
|
||||
<enum name="iconShiftedShiftKey" value="11" />
|
||||
<enum name="iconShiftedShiftKey" value="12" />
|
||||
</attr>
|
||||
<!-- The icon to show in the popup preview. -->
|
||||
<attr name="keyIconPreview" format="enum">
|
||||
<!-- This should be aligned with KeyboardIcons.ICON_PREVIEW_* -->
|
||||
<enum name="iconPreviewSpaceKey" value="12" />
|
||||
<enum name="iconPreviewTabKey" value="13" />
|
||||
<enum name="iconPreviewSettingsKey" value="14" />
|
||||
<enum name="iconPreviewShortcutKey" value="15" />
|
||||
<enum name="iconPreviewSpaceKey" value="13" />
|
||||
<enum name="iconPreviewTabKey" value="14" />
|
||||
<enum name="iconPreviewSettingsKey" value="15" />
|
||||
<enum name="iconPreviewShortcutKey" value="16" />
|
||||
</attr>
|
||||
<!-- The key style to specify a set of key attributes defined by <key_style/> -->
|
||||
<attr name="keyStyle" format="string" />
|
||||
|
|
|
@ -18,12 +18,14 @@
|
|||
<style name="KeyboardIcons.Black">
|
||||
<!-- Keyboard icons -->
|
||||
<!-- TODO: The following holo icon for phone (drawable-hdpi and drawable-xhdpi) are too
|
||||
large for phone.
|
||||
ambiguous.
|
||||
sym_bkeyboard_voice_off
|
||||
-->
|
||||
<item name="iconShiftKey">@drawable/sym_bkeyboard_shift</item>
|
||||
<item name="iconToSymbolKeyWithShortcut">@drawable/sym_bkeyboard_123_mic</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="iconShortcutKey">@drawable/sym_bkeyboard_mic</item>
|
||||
<item name="iconSpaceKey">@drawable/sym_bkeyboard_space</item>
|
||||
|
|
|
@ -17,27 +17,14 @@
|
|||
<resources>
|
||||
<style name="KeyboardIcons.IceCreamSandwich">
|
||||
<!-- 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.
|
||||
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="iconToSymbolKeyWithShortcut">@drawable/sym_keyboard_123_mic_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="iconShortcutKey">@drawable/sym_keyboard_voice_holo</item>
|
||||
<item name="iconSpaceKey">@drawable/sym_keyboard_space_holo</item>
|
||||
|
|
|
@ -20,6 +20,8 @@
|
|||
<item name="iconShiftKey">@drawable/sym_keyboard_shift</item>
|
||||
<item name="iconToSymbolKeyWithShortcut">@drawable/sym_keyboard_123_mic</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="iconShortcutKey">@drawable/sym_keyboard_mic</item>
|
||||
<item name="iconSpaceKey">@drawable/sym_keyboard_space</item>
|
||||
|
|
|
@ -59,12 +59,24 @@
|
|||
latin:keyIconShifted="iconShiftedShiftKey"
|
||||
latin:parentStyle="functionalKeyStyle"
|
||||
latin:isSticky="true" />
|
||||
<key-style
|
||||
latin:styleName="deleteKeyStyle"
|
||||
latin:code="@integer/key_delete"
|
||||
latin:keyIcon="iconDeleteKey"
|
||||
latin:parentStyle="functionalKeyStyle"
|
||||
latin:isRepeatable="true" />
|
||||
<switch>
|
||||
<case latin:localeCode="ar|iw">
|
||||
<key-style
|
||||
latin:styleName="deleteKeyStyle"
|
||||
latin:code="@integer/key_delete"
|
||||
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 -->
|
||||
<switch>
|
||||
<case
|
||||
|
|
|
@ -34,21 +34,22 @@ public class KeyboardIconsSet {
|
|||
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_DELETE_KEY = 4;
|
||||
private static final int ICON_SETTINGS_KEY = 5;
|
||||
private static final int ICON_SHORTCUT_KEY = 6;
|
||||
private static final int ICON_SPACE_KEY = 7;
|
||||
private static final int ICON_RETURN_KEY = 8;
|
||||
private static final int ICON_SEARCH_KEY = 9;
|
||||
private static final int ICON_TAB_KEY = 10;
|
||||
private static final int ICON_DELETE_RTL_KEY = 5;
|
||||
private static final int ICON_SETTINGS_KEY = 6;
|
||||
private static final int ICON_SHORTCUT_KEY = 7;
|
||||
private static final int ICON_SPACE_KEY = 8;
|
||||
private static final int ICON_RETURN_KEY = 9;
|
||||
private static final int ICON_SEARCH_KEY = 10;
|
||||
private static final int ICON_TAB_KEY = 11;
|
||||
// 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.
|
||||
private static final int ICON_PREVIEW_SPACE_KEY = 12;
|
||||
private static final int ICON_PREVIEW_TAB_KEY = 13;
|
||||
private static final int ICON_PREVIEW_SETTINGS_KEY = 14;
|
||||
private static final int ICON_PREVIEW_SHORTCUT_KEY = 15;
|
||||
private static final int ICON_PREVIEW_SPACE_KEY = 13;
|
||||
private static final int ICON_PREVIEW_TAB_KEY = 14;
|
||||
private static final int ICON_PREVIEW_SETTINGS_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];
|
||||
|
||||
|
@ -62,6 +63,8 @@ public class KeyboardIconsSet {
|
|||
return ICON_TO_SYMBOL_KEY_WITH_SHORTCUT;
|
||||
case R.styleable.Keyboard_iconDeleteKey:
|
||||
return ICON_DELETE_KEY;
|
||||
case R.styleable.Keyboard_iconDeleteRtlKey:
|
||||
return ICON_DELETE_RTL_KEY;
|
||||
case R.styleable.Keyboard_iconSettingsKey:
|
||||
return ICON_SETTINGS_KEY;
|
||||
case R.styleable.Keyboard_iconShortcutKey:
|
||||
|
|