Adaptive suggestions strip
Bug: 4903845
Change-Id: I9e2e17a9eee72df5c92414dcd4796ed7fe1655e1
diff --git a/java/res/values/attrs.xml b/java/res/values/attrs.xml
index c5897c8..fb99336 100644
--- a/java/res/values/attrs.xml
+++ b/java/res/values/attrs.xml
@@ -120,8 +120,8 @@
<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" />
+ <attr name="colorDivider" format="color" />
+ <attr name="candidateCountInStrip" format="integer" />
</declare-styleable>
<declare-styleable name="Keyboard">
diff --git a/java/res/values/dimens.xml b/java/res/values/dimens.xml
index 36074b3..6cf5fe9 100644
--- a/java/res/values/dimens.xml
+++ b/java/res/values/dimens.xml
@@ -82,6 +82,8 @@
<dimen name="candidate_min_width">44dip</dimen>
<dimen name="candidate_padding">6dip</dimen>
<dimen name="candidate_text_size">18dip</dimen>
+ <integer name="candidate_count_in_strip">3</integer>
+
<!-- If the screen height in landscape is larger than the below value, then the keyboard
will not go into extract (fullscreen) mode. -->
<dimen name="max_height_for_fullscreen">2.5in</dimen>
diff --git a/java/res/values/donottranslate.xml b/java/res/values/donottranslate.xml
index 21e6c55..f88d2df 100644
--- a/java/res/values/donottranslate.xml
+++ b/java/res/values/donottranslate.xml
@@ -43,6 +43,13 @@
<!-- Label for "switch to phone symbols" key. Must be short to fit on key! -->
<string name="label_to_phone_symbols_key">\uff0a\uff03\uff08</string>
+ <!-- Character for candidate divider (BOX DRAWINGS LIGHT VERTICAL) -->
+ <string name="label_candidate_divider">\u2502</string>
+ <!-- Character for expand candidates pane (BLACK DOWN-POINTING TRIANGLE) -->
+ <string name="label_expand_candidates_pane">\u25bc</string>
+ <!-- Character for close candidates pane (BLACK UP-POINTING TRIANGLE) -->
+ <string name="label_close_candidates_pane">\u25b2</string>
+
<!-- Option values to show/hide the settings key in onscreen keyboard -->
<!-- Automatically decide to show or hide the settings key -->
<string name="settings_key_mode_auto">0</string>
diff --git a/java/res/values/styles.xml b/java/res/values/styles.xml
index 29b9d58..c0cc8fb 100644
--- a/java/res/values/styles.xml
+++ b/java/res/values/styles.xml
@@ -92,8 +92,8 @@
<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>"
+ <item name="colorDivider">#20FFFFFF</item>
+ <item name="candidateCountInStrip">@integer/candidate_count_in_strip</item>
</style>
<!-- Theme "Basic high contrast" -->
<style name="KeyboardView.HighContrast" parent="KeyboardView">
@@ -189,12 +189,12 @@
<item name="android:background">@drawable/keyboard_popup_panel_background_holo</item>
</style>
<style name="CandidateViewStyle.IceCreamSandwich" parent="SuggestionsStripBackgroundStyle.IceCreamSandwich">
- <item name="autoCorrectHighlight">autoCorrectUnderline|autoCorrectInvert</item>
+ <item name="autoCorrectHighlight">autoCorrectBold|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>"
+ <item name="colorDivider">#20FFFFFF</item>
+ <item name="candidateCountInStrip">@integer/candidate_count_in_strip</item>
</style>
<style name="PopupMiniKeyboardAnimation">
<item name="android:windowEnterAnimation">@anim/mini_keyboard_fadein</item>