aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTadashi G. Takaoka <takaoka@google.com>2013-08-28 15:59:49 +0900
committerTadashi G. Takaoka <takaoka@google.com>2013-08-28 20:22:18 +0900
commit0861d67fd80a99156e42ec00d4ff4b2b1e8e14dc (patch)
treea78ec46b9f3b02b64d15168ffb5e499ea167756b
parent8e3a90e58ffd09692a23b29dc949a2f0fb3d774c (diff)
downloadlatinime-0861d67fd80a99156e42ec00d4ff4b2b1e8e14dc.tar.gz
latinime-0861d67fd80a99156e42ec00d4ff4b2b1e8e14dc.tar.xz
latinime-0861d67fd80a99156e42ec00d4ff4b2b1e8e14dc.zip
Fix unit test
The breakage of the unit tests has been introduced by Id8caf5a972 that emptied the default styles. This change reverts back some attributes to the default. Change-Id: I2748eefe50e34bbf908071e4a1a17a70aa32bdef
-rw-r--r--java/res/layout/hint_add_to_dictionary.xml2
-rw-r--r--java/res/layout/input_view.xml1
-rw-r--r--java/res/layout/more_keys_keyboard.xml2
-rw-r--r--java/res/layout/more_suggestions.xml2
-rw-r--r--java/res/layout/suggestion_info.xml2
-rw-r--r--java/res/layout/suggestion_word.xml2
-rw-r--r--java/res/values/attrs.xml8
-rw-r--r--java/res/values/themes-common.xml19
-rw-r--r--java/res/values/themes-gb.xml14
-rw-r--r--java/res/values/themes-ics.xml18
10 files changed, 45 insertions, 25 deletions
diff --git a/java/res/layout/hint_add_to_dictionary.xml b/java/res/layout/hint_add_to_dictionary.xml
index 63d4001ad..68a9faf19 100644
--- a/java/res/layout/hint_add_to_dictionary.xml
+++ b/java/res/layout/hint_add_to_dictionary.xml
@@ -33,4 +33,4 @@
android:clickable="false"
android:singleLine="true"
android:ellipsize="none"
- android:background="?attr/suggestionBackground" />
+ style="?attr/suggestionWordStyle" />
diff --git a/java/res/layout/input_view.xml b/java/res/layout/input_view.xml
index 51133b289..78217b01a 100644
--- a/java/res/layout/input_view.xml
+++ b/java/res/layout/input_view.xml
@@ -34,7 +34,6 @@
android:layout_height="@dimen/suggestions_strip_height"
android:paddingRight="@dimen/suggestions_strip_padding"
android:paddingLeft="@dimen/suggestions_strip_padding"
- android:background="?attr/suggestionStripBackground"
style="?attr/suggestionStripViewStyle" />
<!-- To ensure that key preview popup is correctly placed when the current system locale is
one of RTL locales, layoutDirection="ltr" is needed in the SDK version 17+. -->
diff --git a/java/res/layout/more_keys_keyboard.xml b/java/res/layout/more_keys_keyboard.xml
index cab3abcd9..6637117e0 100644
--- a/java/res/layout/more_keys_keyboard.xml
+++ b/java/res/layout/more_keys_keyboard.xml
@@ -23,7 +23,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
- android:background="?attr/moreKeysKeyboardBackground"
+ style="?attr/moreKeysKeyboardContainerStyle"
>
<com.android.inputmethod.keyboard.MoreKeysKeyboardView
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
diff --git a/java/res/layout/more_suggestions.xml b/java/res/layout/more_suggestions.xml
index 0ec0ed1b3..8659f0761 100644
--- a/java/res/layout/more_suggestions.xml
+++ b/java/res/layout/more_suggestions.xml
@@ -23,7 +23,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
- android:background="?attr/moreKeysKeyboardBackground"
+ style="?attr/moreKeysKeyboardContainerStyle"
>
<com.android.inputmethod.latin.suggestions.MoreSuggestionsView
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
diff --git a/java/res/layout/suggestion_info.xml b/java/res/layout/suggestion_info.xml
index 8b0ee3484..0aa26000d 100644
--- a/java/res/layout/suggestion_info.xml
+++ b/java/res/layout/suggestion_info.xml
@@ -24,4 +24,4 @@
android:layout_height="wrap_content"
android:textSize="6dp"
android:textColor="@android:color/white"
- android:background="?attr/suggestionBackground" />
+ style="?attr/suggestionWordStyle" />
diff --git a/java/res/layout/suggestion_word.xml b/java/res/layout/suggestion_word.xml
index e32e6952b..c82a13c99 100644
--- a/java/res/layout/suggestion_word.xml
+++ b/java/res/layout/suggestion_word.xml
@@ -36,4 +36,4 @@
android:clickable="false"
android:singleLine="true"
android:ellipsize="none"
- android:background="?attr/suggestionBackground" />
+ style="?attr/suggestionWordStyle" />
diff --git a/java/res/values/attrs.xml b/java/res/values/attrs.xml
index 218e43ea5..589adecad 100644
--- a/java/res/values/attrs.xml
+++ b/java/res/values/attrs.xml
@@ -32,12 +32,12 @@
<attr name="moreKeysKeyboardStyle" format="reference" />
<!-- MoreKeysKeyboardView style -->
<attr name="moreKeysKeyboardViewStyle" format="reference" />
+ <!-- MoreKeysKeyboardView container style -->
+ <attr name="moreKeysKeyboardContainerStyle" format="reference" />
<!-- Suggestions strip style -->
<attr name="suggestionStripViewStyle" format="reference" />
- <!-- Styled attributes for android:background -->
- <attr name="moreKeysKeyboardBackground" format="reference" />
- <attr name="suggestionStripBackground" format="reference" />
- <attr name="suggestionBackground" format="reference" />
+ <!-- Suggestion word style -->
+ <attr name="suggestionWordStyle" format="reference" />
</declare-styleable>
<declare-styleable name="KeyboardView">
diff --git a/java/res/values/themes-common.xml b/java/res/values/themes-common.xml
index 04c4a52e6..473a1257e 100644
--- a/java/res/values/themes-common.xml
+++ b/java/res/values/themes-common.xml
@@ -30,6 +30,7 @@
<item name="maxMoreKeysColumn">@integer/config_max_more_keys_column</item>
</style>
<style name="KeyboardView">
+ <item name="keyBackground">@drawable/btn_keyboard_key_ics</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>
@@ -100,16 +101,24 @@
<item name="gestureRecognitionSpeedThreshold">@fraction/config_gesture_recognition_speed_threshold</item>
<item name="suppressKeyPreviewAfterBatchInputDuration">@integer/config_suppress_key_preview_after_batch_input_duration</item>
</style>
- <style name="MainKeyboardView" />
+ <style
+ name="MainKeyboardView"
+ parent="KeyboardView" />
<style name="EmojiKeyboardView" />
<style name="MoreKeysKeyboard" />
- <style name="MoreKeysKeyboardView" />
<style
- name="SuggestionStripView"
- >
+ name="MoreKeysKeyboardView"
+ parent="MainKeyboardView" />
+ <style name="MoreKeysKeyboardContainer" />
+ <style name="SuggestionStripView">
<item name="suggestionsCountInStrip">@integer/suggestions_count_in_strip</item>
<item name="centerSuggestionPercentile">@fraction/center_suggestion_percentile</item>
<item name="maxMoreSuggestionsRow">@integer/max_more_suggestions_row</item>
<item name="minMoreSuggestionsWidth">@fraction/min_more_suggestions_width</item>
</style>
-</resources>
+ <style name="SuggestionWord" />
+ <style name="MoreKeysKeyboardAnimation">
+ <item name="android:windowEnterAnimation">@anim/more_keys_keyboard_fadein</item>
+ <item name="android:windowExitAnimation">@anim/more_keys_keyboard_fadeout</item>
+ </style>
+</resources> \ No newline at end of file
diff --git a/java/res/values/themes-gb.xml b/java/res/values/themes-gb.xml
index 4a984af98..d39003d94 100644
--- a/java/res/values/themes-gb.xml
+++ b/java/res/values/themes-gb.xml
@@ -26,10 +26,9 @@
<item name="emojiKeyboardViewStyle">@style/EmojiKeyboardView.GB</item>
<item name="moreKeysKeyboardStyle">@style/MoreKeysKeyboard.GB</item>
<item name="moreKeysKeyboardViewStyle">@style/MoreKeysKeyboardView.GB</item>
+ <item name="moreKeysKeyboardContainerStyle">@style/MoreKeysKeyboardContainer.GB</item>
<item name="suggestionStripViewStyle">@style/SuggestionStripView.GB</item>
- <item name="moreKeysKeyboardBackground">@drawable/keyboard_popup_panel_background_gb</item>
- <item name="suggestionStripBackground">@drawable/keyboard_suggest_strip_gb</item>
- <item name="suggestionBackground">@drawable/btn_suggestion_gb</item>
+ <item name="suggestionWordStyle">@style/SuggestionWord.GB</item>
</style>
<style name="KeyboardIcons.GB">
<!-- Keyboard icons -->
@@ -123,9 +122,15 @@
<item name="verticalCorrection">@dimen/more_keys_keyboard_vertical_correction_gb</item>
</style>
<style
+ name="MoreKeysKeyboardContainer.GB"
+ >
+ <item name="android:background">@drawable/keyboard_popup_panel_background_gb</item>
+ </style>
+ <style
name="SuggestionStripView.GB"
parent="SuggestionStripView"
>
+ <item name="android:background">@drawable/keyboard_suggest_strip_gb</item>
<item name="suggestionStripOption">autoCorrectBold|validTypedWordBold</item>
<item name="colorValidTypedWord">@color/highlight_color_gb</item>
<item name="colorTypedWord">@color/typed_word_color_gb</item>
@@ -133,4 +138,7 @@
<item name="colorSuggested">@color/highlight_color_gb</item>
<item name="alphaObsoleted">50%</item>
</style>
+ <style name="SuggestionWord.GB">
+ <item name="android:background">@drawable/btn_suggestion_gb</item>
+ </style>
</resources>
diff --git a/java/res/values/themes-ics.xml b/java/res/values/themes-ics.xml
index 9f2523c86..f5b74838b 100644
--- a/java/res/values/themes-ics.xml
+++ b/java/res/values/themes-ics.xml
@@ -18,7 +18,7 @@
*/
-->
-<resources>
+<resources xmlns:android="http://schemas.android.com/apk/res/android">
<style name="KeyboardTheme.ICS" parent="KeyboardIcons.ICS">
<item name="keyboardStyle">@style/Keyboard.ICS</item>
<item name="keyboardViewStyle">@style/KeyboardView.ICS</item>
@@ -26,10 +26,9 @@
<item name="emojiKeyboardViewStyle">@style/EmojiKeyboardView.ICS</item>
<item name="moreKeysKeyboardStyle">@style/MoreKeysKeyboard.ICS</item>
<item name="moreKeysKeyboardViewStyle">@style/MoreKeysKeyboardView.ICS</item>
+ <item name="moreKeysKeyboardContainerStyle">@style/MoreKeysKeyboardContainer.ICS</item>
<item name="suggestionStripViewStyle">@style/SuggestionStripView.ICS</item>
- <item name="moreKeysKeyboardBackground">@drawable/keyboard_popup_panel_background_holo</item>
- <item name="suggestionStripBackground">@drawable/keyboard_suggest_strip_holo</item>
- <item name="suggestionBackground">@drawable/btn_suggestion_ics</item>
+ <item name="suggestionWordStyle">@style/SuggestionWord.ICS</item>
</style>
<style name="KeyboardIcons.ICS">
<!-- Keyboard icons -->
@@ -124,9 +123,15 @@
<item name="verticalCorrection">@dimen/more_keys_keyboard_vertical_correction_ics</item>
</style>
<style
+ name="MoreKeysKeyboardContainer.ICS"
+ >
+ <item name="android:background">@drawable/keyboard_popup_panel_background_holo</item>
+ </style>
+ <style
name="SuggestionStripView.ICS"
parent="SuggestionStripView"
>
+ <item name="android:background">@drawable/keyboard_suggest_strip_holo</item>
<item name="suggestionStripOption">autoCorrectBold|validTypedWordBold</item>
<item name="colorValidTypedWord">@color/typed_word_color_ics</item>
<item name="colorTypedWord">@color/typed_word_color_ics</item>
@@ -134,8 +139,7 @@
<item name="colorSuggested">@color/suggested_word_color_ics</item>
<item name="alphaObsoleted">70%</item>
</style>
- <style name="MoreKeysKeyboardAnimation">
- <item name="android:windowEnterAnimation">@anim/more_keys_keyboard_fadein</item>
- <item name="android:windowExitAnimation">@anim/more_keys_keyboard_fadeout</item>
+ <style name="SuggestionWord.ICS">
+ <item name="android:background">@drawable/btn_suggestion_ics</item>
</style>
</resources>