diff options
Diffstat (limited to 'java/res')
-rw-r--r-- | java/res/layout/candidates_strip.xml | 8 | ||||
-rw-r--r-- | java/res/layout/input_view.xml | 3 | ||||
-rw-r--r-- | java/res/values-sw600dp/config.xml | 1 | ||||
-rw-r--r-- | java/res/values-sw768dp/config.xml | 1 | ||||
-rw-r--r-- | java/res/values/attrs.xml | 15 | ||||
-rw-r--r-- | java/res/values/colors.xml | 3 | ||||
-rw-r--r-- | java/res/values/config.xml | 1 | ||||
-rw-r--r-- | java/res/values/styles.xml | 17 | ||||
-rw-r--r-- | java/res/values/themes.xml | 6 |
9 files changed, 42 insertions, 13 deletions
diff --git a/java/res/layout/candidates_strip.xml b/java/res/layout/candidates_strip.xml index 296ea7585..88f4c3830 100644 --- a/java/res/layout/candidates_strip.xml +++ b/java/res/layout/candidates_strip.xml @@ -42,20 +42,18 @@ <include android:id="@+id/candidate_right" layout="@layout/candidate" /> - <!-- TODO: These images' drawable must be determined depending on theme. --> + <!-- Image drawables are set in CandidateView constructor --> <ImageButton android:id="@+id/expand_candidates_pane" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:src="@drawable/btn_expand_candidates_pane" android:visibility="gone" - style="?attr/suggestionBackgroundStyle" /> + style="?attr/suggestionsStripBackgroundStyle" /> <ImageButton android:id="@+id/close_candidates_pane" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:src="@drawable/btn_close_candidates_pane" android:visibility="gone" - style="?attr/suggestionBackgroundStyle" /> + style="?attr/suggestionsStripBackgroundStyle" /> </LinearLayout> </merge> diff --git a/java/res/layout/input_view.xml b/java/res/layout/input_view.xml index 52b5eccc6..f0a8ef956 100644 --- a/java/res/layout/input_view.xml +++ b/java/res/layout/input_view.xml @@ -44,8 +44,7 @@ android:layout_weight="1.0" android:layout_width="0dp" android:layout_height="@dimen/candidate_strip_height" - android:gravity="center_vertical" - style="?attr/suggestionsStripBackgroundStyle" /> + android:gravity="center_vertical" /> <View android:layout_width="@dimen/candidate_strip_padding" android:layout_height="@dimen/candidate_strip_height" diff --git a/java/res/values-sw600dp/config.xml b/java/res/values-sw600dp/config.xml index c3d34456e..6125270a3 100644 --- a/java/res/values-sw600dp/config.xml +++ b/java/res/values-sw600dp/config.xml @@ -26,7 +26,6 @@ <bool name="config_enable_show_recorrection_option">false</bool> <bool name="config_enable_quick_fixes_option">false</bool> <bool name="config_enable_bigram_suggestions_option">false</bool> - <bool name="config_candidate_highlight_font_color_enabled">false</bool> <bool name="config_swipe_down_dismiss_keyboard_enabled">false</bool> <bool name="config_sliding_key_input_enabled">false</bool> <bool name="config_digit_popup_characters_enabled">false</bool> diff --git a/java/res/values-sw768dp/config.xml b/java/res/values-sw768dp/config.xml index 663332fe1..95d5e7e63 100644 --- a/java/res/values-sw768dp/config.xml +++ b/java/res/values-sw768dp/config.xml @@ -26,7 +26,6 @@ <bool name="config_enable_show_recorrection_option">false</bool> <bool name="config_enable_quick_fixes_option">false</bool> <bool name="config_enable_bigram_suggestions_option">false</bool> - <bool name="config_candidate_highlight_font_color_enabled">false</bool> <bool name="config_swipe_down_dismiss_keyboard_enabled">false</bool> <bool name="config_sliding_key_input_enabled">false</bool> <bool name="config_digit_popup_characters_enabled">false</bool> diff --git a/java/res/values/attrs.xml b/java/res/values/attrs.xml index b159f08ce..2aff88983 100644 --- a/java/res/values/attrs.xml +++ b/java/res/values/attrs.xml @@ -28,6 +28,7 @@ <attr name="suggestionsStripBackgroundStyle" format="reference" /> <attr name="suggestionBackgroundStyle" format="reference" /> <attr name="suggestionPreviewBackgroundStyle" format="reference" /> + <attr name="candidateViewStyle" format="reference" /> </declare-styleable> <declare-styleable name="KeyboardView"> @@ -88,6 +89,20 @@ </declare-styleable> + <declare-styleable name="CandidateView"> + <attr name="autoCorrectHighlight" format="integer"> + <flag name="autoCorrectBold" value="0x01" /> + <flag name="autoCorrectUnderline" value="0x02" /> + <flag name="autoCorrectInvert" value="0x04" /> + <flag name="autoCorrectSpacebarLed" value="0x08" /> + </attr> + <attr name="colorTypedWord" format="color" /> + <attr name="colorAutoCorrect" format="color" /> + <attr name="colorSuggested" format="color" /> + <attr name="iconExpandPane" format="reference" /> + <attr name="iconClosePane" format="reference" /> + </declare-styleable> + <declare-styleable name="Keyboard"> <!-- Default keyboard height --> <attr name="keyboardHeight" format="dimension" /> diff --git a/java/res/values/colors.xml b/java/res/values/colors.xml index 05d137e4b..d78691864 100644 --- a/java/res/values/colors.xml +++ b/java/res/values/colors.xml @@ -18,9 +18,6 @@ */ --> <resources> - <color name="candidate_typed_word">#FFFFFFFF</color> - <color name="candidate_auto_correct">#FFFCAE00</color> - <color name="candidate_suggested">#FFFCAE00</color> <color name="latinkeyboard_bar_language_shadow_white">#80000000</color> <color name="latinkeyboard_bar_language_shadow_black">#80FFFFFF</color> <color name="latinkeyboard_bar_language_text">#FFC0C0C0</color> diff --git a/java/res/values/config.xml b/java/res/values/config.xml index c61a6d52a..a08e2ae33 100644 --- a/java/res/values/config.xml +++ b/java/res/values/config.xml @@ -27,7 +27,6 @@ <bool name="config_enable_quick_fixes_option">true</bool> <bool name="config_enable_bigram_suggestions_option">true</bool> <bool name="config_enable_usability_study_mode_option">false</bool> - <bool name="config_candidate_highlight_font_color_enabled">true</bool> <bool name="config_swipe_down_dismiss_keyboard_enabled">true</bool> <bool name="config_sliding_key_input_enabled">true</bool> <bool name="config_digit_popup_characters_enabled">true</bool> diff --git a/java/res/values/styles.xml b/java/res/values/styles.xml index 60ed34a06..06e02c7f4 100644 --- a/java/res/values/styles.xml +++ b/java/res/values/styles.xml @@ -60,6 +60,15 @@ <style name="SuggestionPreviewBackgroundStyle"> <item name="android:background">@drawable/candidate_feedback_background</item> </style> + <style name="CandidateViewStyle" parent="SuggestionsStripBackgroundStyle"> + <!-- TODO: autoCorrectSpacebarLed should be in style for LatinKeyboard. --> + <item name="autoCorrectHighlight">autoCorrectBold|autoCorrectSpacebarLed</item> + <item name="colorTypedWord">#FFFFFFFF</item> + <item name="colorAutoCorrect">#FFFCAE00</item> + <item name="colorSuggested">#FFFCAE00</item> + <item name="iconExpandPane">@drawable/btn_expand_candidates_pane</item> + <item name="iconClosePane">@drawable/btn_close_candidates_pane</item>" + </style> <!-- Theme "Basic high contrast" --> <style name="KeyboardView.HighContrast" parent="KeyboardView"> <item name="android:background">@android:color/black</item> @@ -126,6 +135,14 @@ <style name="SuggestionPreviewBackgroundStyle.Honeycomb"> <item name="android:background">@drawable/keyboard_popup_panel_background_holo</item> </style> + <style name="CandidateViewStyle.Honeycomb" parent="SuggestionsStripBackgroundStyle.Honeycomb"> + <item name="autoCorrectHighlight">autoCorrectUnderline|autoCorrectInvert</item> + <item name="colorTypedWord">#FFFFFFFF</item> + <item name="colorAutoCorrect">#FFFFFFFF</item> + <item name="colorSuggested">#FFFFFFFF</item> + <item name="iconExpandPane">@drawable/btn_expand_candidates_pane</item> + <item name="iconClosePane">@drawable/btn_close_candidates_pane</item>" + </style> <style name="PopupMiniKeyboardAnimation"> <item name="android:windowEnterAnimation">@anim/mini_keyboard_fadein</item> <item name="android:windowExitAnimation">@anim/mini_keyboard_fadeout</item> diff --git a/java/res/values/themes.xml b/java/res/values/themes.xml index 1382dfe65..dbea58036 100644 --- a/java/res/values/themes.xml +++ b/java/res/values/themes.xml @@ -24,6 +24,7 @@ <item name="suggestionsStripBackgroundStyle">@style/SuggestionsStripBackgroundStyle</item> <item name="suggestionBackgroundStyle">@style/SuggestionBackgroundStyle</item> <item name="suggestionPreviewBackgroundStyle">@style/SuggestionPreviewBackgroundStyle</item> + <item name="candidateViewStyle">@style/CandidateViewStyle</item> </style> <style name="KeyboardTheme.HighContrast" parent="android:Theme"> <item name="keyboardStyle">@style/Keyboard</item> @@ -33,6 +34,7 @@ <item name="popupMiniKeyboardPanelStyle">@style/PopupMiniKeyboardPanelStyle</item> <item name="suggestionsStripBackgroundStyle">@style/SuggestionsStripBackgroundStyle</item> <item name="suggestionBackgroundStyle">@style/SuggestionBackgroundStyle</item> + <item name="candidateViewStyle">@style/CandidateViewStyle</item> </style> <style name="KeyboardTheme.Stone" parent="android:Theme.Light"> <item name="keyboardStyle">@style/Keyboard</item> @@ -42,6 +44,7 @@ <item name="popupMiniKeyboardPanelStyle">@style/PopupMiniKeyboardPanelStyle</item> <item name="suggestionsStripBackgroundStyle">@style/SuggestionsStripBackgroundStyle</item> <item name="suggestionBackgroundStyle">@style/SuggestionBackgroundStyle</item> + <item name="candidateViewStyle">@style/CandidateViewStyle</item> </style> <style name="KeyboardTheme.Stone.Bold" parent="android:Theme.Light"> <item name="keyboardStyle">@style/Keyboard</item> @@ -51,6 +54,7 @@ <item name="popupMiniKeyboardPanelStyle">@style/PopupMiniKeyboardPanelStyle</item> <item name="suggestionsStripBackgroundStyle">@style/SuggestionsStripBackgroundStyle</item> <item name="suggestionBackgroundStyle">@style/SuggestionBackgroundStyle</item> + <item name="candidateViewStyle">@style/CandidateViewStyle</item> </style> <style name="KeyboardTheme.Gingerbread" parent="android:Theme.Black"> <item name="keyboardStyle">@style/Keyboard</item> @@ -60,6 +64,7 @@ <item name="popupMiniKeyboardPanelStyle">@style/PopupMiniKeyboardPanelStyle</item> <item name="suggestionsStripBackgroundStyle">@style/SuggestionsStripBackgroundStyle</item> <item name="suggestionBackgroundStyle">@style/SuggestionBackgroundStyle</item> + <item name="candidateViewStyle">@style/CandidateViewStyle</item> </style> <style name="KeyboardTheme.Honeycomb" parent="android:Theme.Holo"> <item name="keyboardStyle">@style/Keyboard.Honeycomb</item> @@ -69,5 +74,6 @@ <item name="popupMiniKeyboardPanelStyle">@style/PopupMiniKeyboardPanelStyle.Honeycomb</item> <item name="suggestionsStripBackgroundStyle">@style/SuggestionsStripBackgroundStyle.Honeycomb</item> <item name="suggestionBackgroundStyle">@style/SuggestionBackgroundStyle.Honeycomb</item> + <item name="candidateViewStyle">@style/CandidateViewStyle.Honeycomb</item> </style> </resources> |