aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTadashi G. Takaoka <takaoka@google.com>2013-08-27 13:01:20 +0900
committerTadashi G. Takaoka <takaoka@google.com>2013-08-27 14:41:54 +0900
commitadaaf9ffb8f8ee0fa568d232ac140b74b0be4e38 (patch)
tree960baef3041b7e108cc0a04f465d722e50d650ae
parent1f4612fc5434e5b223d6f6c1ef77fb5fae0d32ee (diff)
downloadlatinime-adaaf9ffb8f8ee0fa568d232ac140b74b0be4e38.tar.gz
latinime-adaaf9ffb8f8ee0fa568d232ac140b74b0be4e38.tar.xz
latinime-adaaf9ffb8f8ee0fa568d232ac140b74b0be4e38.zip
Rename theme file names
Bug: 10415342 Change-Id: I692b157953f77c610482b494cbaeed4430bcb629
-rw-r--r--java/res/drawable/btn_keyboard_key.xml37
-rw-r--r--java/res/drawable/btn_keyboard_key_gb.xml (renamed from java/res/drawable/btn_keyboard_key_gingerbread.xml)0
-rw-r--r--java/res/drawable/btn_keyboard_key_popup_gb.xml (renamed from java/res/drawable/btn_keyboard_key_popup.xml)0
-rw-r--r--java/res/drawable/btn_suggestion_gb.xml (renamed from java/res/drawable/btn_suggestion.xml)0
-rw-r--r--java/res/drawable/keyboard_key_feedback_gb.xml (renamed from java/res/drawable/keyboard_key_feedback.xml)0
-rw-r--r--java/res/layout/key_preview_gb.xml (renamed from java/res/layout/key_preview.xml)2
-rw-r--r--java/res/values-sw600dp/touch-position-correction.xml4
-rw-r--r--java/res/values/colors.xml2
-rw-r--r--java/res/values/keyboard-icons-gb.xml (renamed from java/res/values/keyboard-icons-white.xml)0
-rw-r--r--java/res/values/keyboard-icons-ics.xml2
-rw-r--r--java/res/values/styles.xml66
-rw-r--r--java/res/values/themes-gb.xml (renamed from java/res/values/themes-gingerbread.xml)12
-rw-r--r--java/res/values/themes-ics.xml20
-rw-r--r--java/res/values/touch-position-correction.xml4
-rw-r--r--java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java4
15 files changed, 56 insertions, 97 deletions
diff --git a/java/res/drawable/btn_keyboard_key.xml b/java/res/drawable/btn_keyboard_key.xml
deleted file mode 100644
index 112ac2636..000000000
--- a/java/res/drawable/btn_keyboard_key.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2008 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<selector xmlns:android="http://schemas.android.com/apk/res/android">
- <!-- Toggle keys. Use checkable/checked state. -->
- <item android:state_checkable="true" android:state_checked="true"
- android:state_pressed="true"
- android:drawable="@drawable/btn_keyboard_key_pressed_on" />
- <item android:state_checkable="true" android:state_pressed="true"
- android:drawable="@drawable/btn_keyboard_key_pressed_off" />
- <item android:state_checkable="true" android:state_checked="true"
- android:drawable="@drawable/btn_keyboard_key_normal_on" />
- <item android:state_checkable="true"
- android:drawable="@drawable/btn_keyboard_key_normal_off" />
-
- <!-- Empty background keys. -->
- <item android:state_empty="true"
- android:drawable="@drawable/transparent" />
-
- <!-- Normal keys. -->
- <item android:state_pressed="true"
- android:drawable="@drawable/btn_keyboard_key_pressed" />
- <item android:drawable="@drawable/btn_keyboard_key_normal" />
-</selector>
diff --git a/java/res/drawable/btn_keyboard_key_gingerbread.xml b/java/res/drawable/btn_keyboard_key_gb.xml
index 3fc253e85..3fc253e85 100644
--- a/java/res/drawable/btn_keyboard_key_gingerbread.xml
+++ b/java/res/drawable/btn_keyboard_key_gb.xml
diff --git a/java/res/drawable/btn_keyboard_key_popup.xml b/java/res/drawable/btn_keyboard_key_popup_gb.xml
index 9e3670d22..9e3670d22 100644
--- a/java/res/drawable/btn_keyboard_key_popup.xml
+++ b/java/res/drawable/btn_keyboard_key_popup_gb.xml
diff --git a/java/res/drawable/btn_suggestion.xml b/java/res/drawable/btn_suggestion_gb.xml
index cde12fe55..cde12fe55 100644
--- a/java/res/drawable/btn_suggestion.xml
+++ b/java/res/drawable/btn_suggestion_gb.xml
diff --git a/java/res/drawable/keyboard_key_feedback.xml b/java/res/drawable/keyboard_key_feedback_gb.xml
index 397e948d8..397e948d8 100644
--- a/java/res/drawable/keyboard_key_feedback.xml
+++ b/java/res/drawable/keyboard_key_feedback_gb.xml
diff --git a/java/res/layout/key_preview.xml b/java/res/layout/key_preview_gb.xml
index 2fcd0c4dd..2f2a321a3 100644
--- a/java/res/layout/key_preview.xml
+++ b/java/res/layout/key_preview_gb.xml
@@ -21,7 +21,7 @@
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:background="@drawable/keyboard_key_feedback"
+ android:background="@drawable/keyboard_key_feedback_gb"
android:minWidth="32dp"
android:gravity="center"
/>
diff --git a/java/res/values-sw600dp/touch-position-correction.xml b/java/res/values-sw600dp/touch-position-correction.xml
index f77d3ae83..df07c1295 100644
--- a/java/res/values-sw600dp/touch-position-correction.xml
+++ b/java/res/values-sw600dp/touch-position-correction.xml
@@ -37,7 +37,7 @@
</string-array>
<string-array
- name="touch_position_correction_data_gingerbread"
+ name="touch_position_correction_data_gb"
translatable="false"
>
<!-- The default touch position data (See com.android.inputmethod.keyboard.ProximityInfo)
@@ -48,7 +48,7 @@
</string-array>
<string-array
- name="touch_position_correction_data_ice_cream_sandwich"
+ name="touch_position_correction_data_ics"
translatable="false"
>
<!-- The default touch position data (See com.android.inputmethod.keyboard.ProximityInfo)
diff --git a/java/res/values/colors.xml b/java/res/values/colors.xml
index 1f88d3cab..6f00c9197 100644
--- a/java/res/values/colors.xml
+++ b/java/res/values/colors.xml
@@ -20,7 +20,7 @@
<color name="highlight_translucent_color_default">#99FCAE00</color>
<color name="key_text_color_default">@android:color/white</color>
<color name="key_text_shadow_color_default">#BB000000</color>
- <color name="key_text_inactivated_color_default">@android:color/white</color>
+ <color name="key_text_inactivated_color_default">#66E0E4E5</color>
<color name="key_hint_letter_color_default">#80000000</color>
<color name="key_hint_label_color_default">#E0E0E4E5</color>
<color name="key_shifted_letter_hint_inactivated_color_default">#66E0E4E5</color>
diff --git a/java/res/values/keyboard-icons-white.xml b/java/res/values/keyboard-icons-gb.xml
index 7c6de42fa..7c6de42fa 100644
--- a/java/res/values/keyboard-icons-white.xml
+++ b/java/res/values/keyboard-icons-gb.xml
diff --git a/java/res/values/keyboard-icons-ics.xml b/java/res/values/keyboard-icons-ics.xml
index 5ada27ae8..9c9bc3cf7 100644
--- a/java/res/values/keyboard-icons-ics.xml
+++ b/java/res/values/keyboard-icons-ics.xml
@@ -15,7 +15,7 @@
-->
<resources>
- <style name="KeyboardIcons.IceCreamSandwich">
+ <style name="KeyboardIcons.ICS">
<!-- Keyboard icons -->
<!-- TODO: The following holo icon for phone (drawable-hdpi and drawable-xhdpi) are missing.
sym_keyboard_123_mic_holo
diff --git a/java/res/values/styles.xml b/java/res/values/styles.xml
index c73b28910..97d320411 100644
--- a/java/res/values/styles.xml
+++ b/java/res/values/styles.xml
@@ -15,11 +15,8 @@
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android">
- <!-- TODO: Remove "Basic" theme and make "IceCreamSandwich" default -->
- <!-- Theme "Basic" -->
+ <!-- Default theme values -->
<style name="Keyboard">
- <!-- This should be aligned with KeyboardSwitcher.KEYBOARD_THEMES[] -->
- <item name="themeId">0</item>
<item name="touchPositionCorrectionData">@array/touch_position_correction_data_default</item>
<item name="rowHeight">25%p</item>
<item name="moreKeysTemplate">@xml/kbd_more_keys_keyboard_template</item>
@@ -33,7 +30,6 @@
</style>
<style name="KeyboardView">
<item name="android:background">@drawable/keyboard_background</item>
- <item name="keyBackground">@drawable/btn_keyboard_key</item>
<item name="keyLetterSize">@fraction/key_letter_ratio</item>
<item name="keyLargeLetterRatio">@fraction/key_large_letter_ratio</item>
<item name="keyLabelSize">@fraction/key_label_ratio</item>
@@ -43,7 +39,7 @@
<item name="keyShiftedLetterHintRatio">@fraction/key_uppercase_letter_ratio</item>
<item name="keyTypeface">normal</item>
<item name="keyTextColor">@color/key_text_color_default</item>
- <item name="keyTextInactivatedColor">@color/key_text_color_default</item>
+ <item name="keyTextInactivatedColor">@color/key_text_inactivated_color_default</item>
<item name="keyHintLetterColor">@color/key_hint_letter_color_default</item>
<item name="keyHintLabelColor">@color/key_hint_label_color_default</item>
<item name="keyShiftedLetterHintInactivatedColor">@color/key_shifted_letter_hint_inactivated_color_default</item>
@@ -91,7 +87,6 @@
<item name="keyRepeatInterval">@integer/config_key_repeat_interval</item>
<item name="longPressShiftLockTimeout">@integer/config_longpress_shift_lock_timeout</item>
<item name="ignoreAltCodeKeyTimeout">@integer/config_ignore_alt_code_key_timeout</item>
- <item name="keyPreviewLayout">@layout/key_preview</item>
<item name="keyPreviewOffset">@dimen/key_preview_offset</item>
<item name="keyPreviewHeight">@dimen/key_preview_height</item>
<item name="keyPreviewLingerTimeout">@integer/config_key_preview_linger_timeout</item>
@@ -140,7 +135,7 @@
name="MoreKeysKeyboardView"
parent="KeyboardView"
>
- <item name="keyBackground">@drawable/btn_keyboard_key_popup</item>
+ <item name="keyBackground">@drawable/btn_keyboard_key_popup_gb</item>
<item name="verticalCorrection">@dimen/more_keys_keyboard_vertical_correction</item>
</style>
<style name="MoreKeysKeyboardPanelStyle">
@@ -167,30 +162,31 @@
>
</style>
<style name="SuggestionBackgroundStyle">
- <item name="android:background">@drawable/btn_suggestion</item>
+ <item name="android:background">@drawable/btn_suggestion_gb</item>
</style>
<!-- Theme "Gingerbread" -->
<style
- name="Keyboard.Gingerbread"
+ name="Keyboard.GB"
parent="Keyboard"
>
<!-- This should be aligned with KeyboardSwitcher.KEYBOARD_THEMES[] -->
- <item name="themeId">8</item>
- <item name="touchPositionCorrectionData">@array/touch_position_correction_data_gingerbread</item>
+ <item name="themeId">1</item>
+ <item name="touchPositionCorrectionData">@array/touch_position_correction_data_gb</item>
<item name="horizontalGap">@fraction/key_horizontal_gap_gb</item>
<item name="verticalGap">@fraction/key_bottom_gap_gb</item>
</style>
<style
- name="KeyboardView.Gingerbread"
+ name="KeyboardView.GB"
parent="KeyboardView"
>
<item name="android:background">@drawable/keyboard_dark_background</item>
- <item name="keyBackground">@drawable/btn_keyboard_key_gingerbread</item>
+ <item name="keyBackground">@drawable/btn_keyboard_key_gb</item>
<item name="keyTypeface">bold</item>
+ <item name="keyPreviewLayout">@layout/key_preview_gb</item>
</style>
<style
- name="MainKeyboardView.Gingerbread"
- parent="KeyboardView.Gingerbread"
+ name="MainKeyboardView.GB"
+ parent="KeyboardView.GB"
>
<item name="autoCorrectionSpacebarLedEnabled">true</item>
<item name="autoCorrectionSpacebarLedIcon">@drawable/sym_keyboard_space_led</item>
@@ -199,8 +195,8 @@
<item name="spacebarTextShadowColor">@color/spacebar_text_shadow_color_default</item>
</style>
<style
- name="MoreKeysKeyboard.Gingerbread"
- parent="Keyboard.Gingerbread"
+ name="MoreKeysKeyboard.GB"
+ parent="Keyboard.GB"
>
<item name="keyboardTopPadding">0%p</item>
<item name="keyboardBottomPadding">0%p</item>
@@ -208,26 +204,26 @@
<item name="touchPositionCorrectionData">@null</item>
</style>
<style
- name="MoreKeysKeyboardView.Gingerbread"
+ name="MoreKeysKeyboardView.GB"
parent="MoreKeysKeyboardView"
>
<item name="android:background">@null</item>
</style>
<!-- Theme "IceCreamSandwich" -->
<style
- name="Keyboard.IceCreamSandwich"
+ name="Keyboard.ICS"
parent="Keyboard"
>
<!-- This should be aligned with KeyboardSwitcher.KEYBOARD_THEMES[] -->
- <item name="themeId">5</item>
+ <item name="themeId">0</item>
<item name="keyboardTopPadding">@fraction/keyboard_top_padding_ics</item>
<item name="keyboardBottomPadding">@fraction/keyboard_bottom_padding_ics</item>
<item name="horizontalGap">@fraction/key_horizontal_gap_ics</item>
<item name="verticalGap">@fraction/key_bottom_gap_ics</item>
- <item name="touchPositionCorrectionData">@array/touch_position_correction_data_ice_cream_sandwich</item>
+ <item name="touchPositionCorrectionData">@array/touch_position_correction_data_ics</item>
</style>
<style
- name="KeyboardView.IceCreamSandwich"
+ name="KeyboardView.ICS"
parent="KeyboardView"
>
<item name="android:background">@drawable/keyboard_background_holo</item>
@@ -248,8 +244,8 @@
<item name="gestureTrailColor">@color/highlight_color_ics</item>
</style>
<style
- name="MainKeyboardView.IceCreamSandwich"
- parent="KeyboardView.IceCreamSandwich"
+ name="MainKeyboardView.ICS"
+ parent="KeyboardView.ICS"
>
<item name="autoCorrectionSpacebarLedEnabled">false</item>
<item name="autoCorrectionSpacebarLedIcon">@drawable/sym_keyboard_space_led_holo</item>
@@ -258,8 +254,8 @@
<item name="spacebarTextShadowColor">@color/spacebar_text_shadow_color_ics</item>
</style>
<style
- name="MoreKeysKeyboard.IceCreamSandwich"
- parent="Keyboard.IceCreamSandwich"
+ name="MoreKeysKeyboard.ICS"
+ parent="Keyboard.ICS"
>
<item name="keyboardTopPadding">0%p</item>
<item name="keyboardBottomPadding">0%p</item>
@@ -267,18 +263,18 @@
<item name="touchPositionCorrectionData">@null</item>
</style>
<style
- name="MoreKeysKeyboardView.IceCreamSandwich"
+ name="MoreKeysKeyboardView.ICS"
parent="MoreKeysKeyboardView"
>
<item name="android:background">@null</item>
<item name="keyBackground">@drawable/btn_keyboard_key_popup_ics</item>
<item name="verticalCorrection">@dimen/more_keys_keyboard_vertical_correction_ics</item>
</style>
- <style name="MoreKeysKeyboardPanelStyle.IceCreamSandwich">
+ <style name="MoreKeysKeyboardPanelStyle.ICS">
<item name="android:background">@drawable/keyboard_popup_panel_background_holo</item>
</style>
<style
- name="SuggestionStripViewStyle.IceCreamSandwich"
+ name="SuggestionStripViewStyle.ICS"
>
<item name="android:background">@drawable/keyboard_suggest_strip_holo</item>
<item name="suggestionStripOption">autoCorrectBold|validTypedWordBold</item>
@@ -293,16 +289,16 @@
<item name="minMoreSuggestionsWidth">@fraction/min_more_suggestions_width</item>
</style>
<style
- name="MoreSuggestionsViewStyle.IceCreamSandwich"
- parent="MoreKeysKeyboardView.IceCreamSandwich"
+ name="MoreSuggestionsViewStyle.ICS"
+ parent="MoreKeysKeyboardView.ICS"
>
</style>
- <style name="SuggestionBackgroundStyle.IceCreamSandwich">
+ <style name="SuggestionBackgroundStyle.ICS">
<item name="android:background">@drawable/btn_suggestion_ics</item>
</style>
<style
- name="SuggestionPreviewBackgroundStyle.IceCreamSandwich"
- parent="MoreKeysKeyboardPanelStyle.IceCreamSandwich"
+ name="SuggestionPreviewBackgroundStyle.ICS"
+ parent="MoreKeysKeyboardPanelStyle.ICS"
>
</style>
<style name="MoreKeysKeyboardAnimation">
diff --git a/java/res/values/themes-gingerbread.xml b/java/res/values/themes-gb.xml
index 129afdf5b..714107192 100644
--- a/java/res/values/themes-gingerbread.xml
+++ b/java/res/values/themes-gb.xml
@@ -15,12 +15,12 @@
-->
<resources>
- <style name="KeyboardTheme.Gingerbread" parent="KeyboardIcons">
- <item name="keyboardStyle">@style/Keyboard.Gingerbread</item>
- <item name="keyboardViewStyle">@style/KeyboardView.Gingerbread</item>
- <item name="mainKeyboardViewStyle">@style/MainKeyboardView.Gingerbread</item>
- <item name="moreKeysKeyboardStyle">@style/MoreKeysKeyboard.Gingerbread</item>
- <item name="moreKeysKeyboardViewStyle">@style/MoreKeysKeyboardView.Gingerbread</item>
+ <style name="KeyboardTheme.GB" parent="KeyboardIcons">
+ <item name="keyboardStyle">@style/Keyboard.GB</item>
+ <item name="keyboardViewStyle">@style/KeyboardView.GB</item>
+ <item name="mainKeyboardViewStyle">@style/MainKeyboardView.GB</item>
+ <item name="moreKeysKeyboardStyle">@style/MoreKeysKeyboard.GB</item>
+ <item name="moreKeysKeyboardViewStyle">@style/MoreKeysKeyboardView.GB</item>
<item name="moreKeysKeyboardPanelStyle">@style/MoreKeysKeyboardPanelStyle</item>
<item name="suggestionStripViewStyle">@style/SuggestionStripViewStyle</item>
<item name="moreSuggestionsViewStyle">@style/MoreSuggestionsViewStyle</item>
diff --git a/java/res/values/themes-ics.xml b/java/res/values/themes-ics.xml
index 1264831f3..7713789e3 100644
--- a/java/res/values/themes-ics.xml
+++ b/java/res/values/themes-ics.xml
@@ -15,15 +15,15 @@
-->
<resources>
- <style name="KeyboardTheme.IceCreamSandwich" parent="KeyboardIcons.IceCreamSandwich">
- <item name="keyboardStyle">@style/Keyboard.IceCreamSandwich</item>
- <item name="keyboardViewStyle">@style/KeyboardView.IceCreamSandwich</item>
- <item name="mainKeyboardViewStyle">@style/MainKeyboardView.IceCreamSandwich</item>
- <item name="moreKeysKeyboardStyle">@style/MoreKeysKeyboard.IceCreamSandwich</item>
- <item name="moreKeysKeyboardViewStyle">@style/MoreKeysKeyboardView.IceCreamSandwich</item>
- <item name="moreKeysKeyboardPanelStyle">@style/MoreKeysKeyboardPanelStyle.IceCreamSandwich</item>
- <item name="suggestionStripViewStyle">@style/SuggestionStripViewStyle.IceCreamSandwich</item>
- <item name="moreSuggestionsViewStyle">@style/MoreSuggestionsViewStyle.IceCreamSandwich</item>
- <item name="suggestionBackgroundStyle">@style/SuggestionBackgroundStyle.IceCreamSandwich</item>
+ <style name="KeyboardTheme.ICS" parent="KeyboardIcons.ICS">
+ <item name="keyboardStyle">@style/Keyboard.ICS</item>
+ <item name="keyboardViewStyle">@style/KeyboardView.ICS</item>
+ <item name="mainKeyboardViewStyle">@style/MainKeyboardView.ICS</item>
+ <item name="moreKeysKeyboardStyle">@style/MoreKeysKeyboard.ICS</item>
+ <item name="moreKeysKeyboardViewStyle">@style/MoreKeysKeyboardView.ICS</item>
+ <item name="moreKeysKeyboardPanelStyle">@style/MoreKeysKeyboardPanelStyle.ICS</item>
+ <item name="suggestionStripViewStyle">@style/SuggestionStripViewStyle.ICS</item>
+ <item name="moreSuggestionsViewStyle">@style/MoreSuggestionsViewStyle.ICS</item>
+ <item name="suggestionBackgroundStyle">@style/SuggestionBackgroundStyle.ICS</item>
</style>
</resources>
diff --git a/java/res/values/touch-position-correction.xml b/java/res/values/touch-position-correction.xml
index 7df86f467..9df517b32 100644
--- a/java/res/values/touch-position-correction.xml
+++ b/java/res/values/touch-position-correction.xml
@@ -37,7 +37,7 @@
</string-array>
<string-array
- name="touch_position_correction_data_gingerbread"
+ name="touch_position_correction_data_gb"
translatable="false"
>
<!-- First row -->
@@ -57,7 +57,7 @@
</string-array>
<string-array
- name="touch_position_correction_data_ice_cream_sandwich"
+ name="touch_position_correction_data_ics"
translatable="false"
>
<!-- First row -->
diff --git a/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java b/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java
index ff2692d81..098c8b3df 100644
--- a/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java
+++ b/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java
@@ -58,8 +58,8 @@ public final class KeyboardSwitcher implements KeyboardState.SwitchActions {
}
private static final KeyboardTheme[] KEYBOARD_THEMES = {
- new KeyboardTheme(5, R.style.KeyboardTheme_IceCreamSandwich),
- new KeyboardTheme(8, R.style.KeyboardTheme_Gingerbread),
+ new KeyboardTheme(0, R.style.KeyboardTheme_ICS),
+ new KeyboardTheme(1, R.style.KeyboardTheme_GB),
};
private SubtypeSwitcher mSubtypeSwitcher;