Skip to content
Snippets Groups Projects
Commit 7e724487 authored by Tadashi G. Takaoka's avatar Tadashi G. Takaoka Committed by Android (Google) Code Review
Browse files

Merge "Adaptive suggestions strip"

parents bb15e775 74b6897a
No related branches found
No related tags found
No related merge requests found
Showing
with 343 additions and 216 deletions
java/res/drawable-hdpi/btn_close_candidates_pane.9.png

936 B

java/res/drawable-hdpi/btn_expand_candidates_pane.9.png

1.1 KiB

java/res/drawable-hdpi/keyboard_suggest_strip_divider.png

2.88 KiB

java/res/drawable-mdpi/btn_close_candidates_pane.9.png

713 B

java/res/drawable-mdpi/btn_expand_candidates_pane.9.png

681 B

java/res/drawable-mdpi/keyboard_suggest_strip_divider.png

2.75 KiB

java/res/drawable-xhdpi/btn_close_candidates_pane.9.png

1 KiB

java/res/drawable-xhdpi/btn_expand_candidates_pane.9.png

1.32 KiB

java/res/drawable-xhdpi/keyboard_suggest_strip_divider.png

2.88 KiB

...@@ -18,12 +18,13 @@ ...@@ -18,12 +18,13 @@
*/ */
--> -->
<ImageView <TextView
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="match_parent" android:layout_height="match_parent"
android:src="@drawable/keyboard_suggest_strip_divider" android:text="@string/label_candidate_divider"
android:textSize="@dimen/candidate_text_size"
android:gravity="center"
android:padding="0dp" android:padding="0dp"
android:focusable="false" android:focusable="false"
android:clickable="false" android:clickable="false" />
android:gravity="center_vertical|center_horizontal" />
...@@ -18,16 +18,19 @@ ...@@ -18,16 +18,19 @@
*/ */
--> -->
<Button <TextView
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:minWidth="@dimen/candidate_min_width" android:minWidth="@dimen/candidate_min_width"
android:textSize="@dimen/candidate_text_size" android:textSize="@dimen/candidate_text_size"
android:gravity="center"
android:paddingLeft="@dimen/candidate_padding" android:paddingLeft="@dimen/candidate_padding"
android:paddingTop="0dp" android:paddingTop="0dp"
android:paddingRight="@dimen/candidate_padding" android:paddingRight="@dimen/candidate_padding"
android:paddingBottom="0dp" android:paddingBottom="0dp"
android:focusable="false"
android:clickable="false"
android:singleLine="true" android:singleLine="true"
android:ellipsize="none" android:ellipsize="none"
style="?attr/suggestionBackgroundStyle" /> style="?attr/suggestionBackgroundStyle" />
...@@ -25,73 +25,39 @@ ...@@ -25,73 +25,39 @@
<LinearLayout <LinearLayout
android:id="@+id/candidates_strip" android:id="@+id/candidates_strip"
android:orientation="horizontal" android:orientation="horizontal"
android:layout_width="match_parent" android:layout_weight="1.0"
android:layout_width="0dp"
android:layout_height="match_parent" android:layout_height="match_parent"
> >
<RelativeLayout </LinearLayout>
android:layout_weight="1.0" <LinearLayout
android:layout_width="0dp" android:id="@+id/candidates_pane_control"
android:layout_height="match_parent" android:orientation="horizontal"
android:layout_width="wrap_content"
android:layout_height="match_parent"
>
<TextView
android:id="@+id/expand_candidates_pane"
android:text="@string/label_expand_candidates_pane"
android:gravity="center" android:gravity="center"
> android:layout_width="wrap_content"
<include
android:id="@+id/word_left"
layout="@layout/candidate_word" />
<include
android:id="@+id/info_left"
layout="@layout/candidate_info" />
</RelativeLayout>
<include
layout="@layout/candidate_divider" />
<RelativeLayout
android:layout_weight="1.0"
android:layout_width="0dp"
android:layout_height="match_parent" android:layout_height="match_parent"
android:minWidth="30dp"
android:textSize="@dimen/candidate_text_size"
android:padding="0dp"
android:visibility="visible"
style="?attr/suggestionBackgroundStyle" />
<TextView
android:id="@+id/close_candidates_pane"
android:text="@string/label_close_candidates_pane"
android:gravity="center" android:gravity="center"
> android:layout_width="wrap_content"
<include
android:id="@+id/word_center"
layout="@layout/candidate_word" />
<include
android:id="@+id/info_center"
layout="@layout/candidate_info" />
</RelativeLayout>
<include
layout="@layout/candidate_divider" />
<LinearLayout
android:orientation="horizontal"
android:layout_weight="1.0"
android:layout_width="0dp"
android:layout_height="match_parent" android:layout_height="match_parent"
android:gravity="center_vertical" android:minWidth="30dp"
> android:textSize="@dimen/candidate_text_size"
<RelativeLayout android:padding="0dp"
android:layout_weight="1.0" android:visibility="gone"
android:layout_width="0dp" style="?attr/suggestionBackgroundStyle" />
android:layout_height="match_parent"
android:gravity="center"
>
<include
android:id="@+id/word_right"
layout="@layout/candidate_word" />
<include
android:id="@+id/info_right"
layout="@layout/candidate_info" />
</RelativeLayout>
<!-- 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:visibility="gone"
android:background="@null" />
<ImageButton
android:id="@+id/close_candidates_pane"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="gone"
android:background="@null" />
</LinearLayout>
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
android:id="@+id/touch_to_save" android:id="@+id/touch_to_save"
......
...@@ -53,4 +53,5 @@ ...@@ -53,4 +53,5 @@
<fraction name="key_uppercase_letter_ratio">29%</fraction> <fraction name="key_uppercase_letter_ratio">29%</fraction>
<dimen name="candidate_strip_padding">40.0mm</dimen> <dimen name="candidate_strip_padding">40.0mm</dimen>
<integer name="candidate_count_in_strip">5</integer>
</resources> </resources>
...@@ -58,4 +58,5 @@ ...@@ -58,4 +58,5 @@
<dimen name="key_preview_offset_ics">0.05in</dimen> <dimen name="key_preview_offset_ics">0.05in</dimen>
<dimen name="candidate_strip_padding">40.0mm</dimen> <dimen name="candidate_strip_padding">40.0mm</dimen>
<integer name="candidate_count_in_strip">5</integer>
</resources> </resources>
...@@ -120,8 +120,8 @@ ...@@ -120,8 +120,8 @@
<attr name="colorTypedWord" format="color" /> <attr name="colorTypedWord" format="color" />
<attr name="colorAutoCorrect" format="color" /> <attr name="colorAutoCorrect" format="color" />
<attr name="colorSuggested" format="color" /> <attr name="colorSuggested" format="color" />
<attr name="iconExpandPane" format="reference" /> <attr name="colorDivider" format="color" />
<attr name="iconClosePane" format="reference" /> <attr name="candidateCountInStrip" format="integer" />
</declare-styleable> </declare-styleable>
<declare-styleable name="Keyboard"> <declare-styleable name="Keyboard">
......
...@@ -82,6 +82,8 @@ ...@@ -82,6 +82,8 @@
<dimen name="candidate_min_width">44dip</dimen> <dimen name="candidate_min_width">44dip</dimen>
<dimen name="candidate_padding">6dip</dimen> <dimen name="candidate_padding">6dip</dimen>
<dimen name="candidate_text_size">18dip</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 <!-- If the screen height in landscape is larger than the below value, then the keyboard
will not go into extract (fullscreen) mode. --> will not go into extract (fullscreen) mode. -->
<dimen name="max_height_for_fullscreen">2.5in</dimen> <dimen name="max_height_for_fullscreen">2.5in</dimen>
......
...@@ -43,6 +43,13 @@ ...@@ -43,6 +43,13 @@
<!-- Label for "switch to phone symbols" key. Must be short to fit on key! --> <!-- 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> <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 --> <!-- Option values to show/hide the settings key in onscreen keyboard -->
<!-- Automatically decide to show or hide the settings key --> <!-- Automatically decide to show or hide the settings key -->
<string name="settings_key_mode_auto">0</string> <string name="settings_key_mode_auto">0</string>
......
...@@ -92,8 +92,8 @@ ...@@ -92,8 +92,8 @@
<item name="colorTypedWord">#FFFFFFFF</item> <item name="colorTypedWord">#FFFFFFFF</item>
<item name="colorAutoCorrect">#FFFCAE00</item> <item name="colorAutoCorrect">#FFFCAE00</item>
<item name="colorSuggested">#FFFCAE00</item> <item name="colorSuggested">#FFFCAE00</item>
<item name="iconExpandPane">@drawable/btn_expand_candidates_pane</item> <item name="colorDivider">#20FFFFFF</item>
<item name="iconClosePane">@drawable/btn_close_candidates_pane</item>" <item name="candidateCountInStrip">@integer/candidate_count_in_strip</item>
</style> </style>
<!-- Theme "Basic high contrast" --> <!-- Theme "Basic high contrast" -->
<style name="KeyboardView.HighContrast" parent="KeyboardView"> <style name="KeyboardView.HighContrast" parent="KeyboardView">
...@@ -189,12 +189,12 @@ ...@@ -189,12 +189,12 @@
<item name="android:background">@drawable/keyboard_popup_panel_background_holo</item> <item name="android:background">@drawable/keyboard_popup_panel_background_holo</item>
</style> </style>
<style name="CandidateViewStyle.IceCreamSandwich" parent="SuggestionsStripBackgroundStyle.IceCreamSandwich"> <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="colorTypedWord">#FFFFFFFF</item>
<item name="colorAutoCorrect">#FFFFFFFF</item> <item name="colorAutoCorrect">#FFFFFFFF</item>
<item name="colorSuggested">#FFFFFFFF</item> <item name="colorSuggested">#FFFFFFFF</item>
<item name="iconExpandPane">@drawable/btn_expand_candidates_pane</item> <item name="colorDivider">#20FFFFFF</item>
<item name="iconClosePane">@drawable/btn_close_candidates_pane</item>" <item name="candidateCountInStrip">@integer/candidate_count_in_strip</item>
</style> </style>
<style name="PopupMiniKeyboardAnimation"> <style name="PopupMiniKeyboardAnimation">
<item name="android:windowEnterAnimation">@anim/mini_keyboard_fadein</item> <item name="android:windowEnterAnimation">@anim/mini_keyboard_fadein</item>
......
This diff is collapsed.
...@@ -288,7 +288,7 @@ public class Settings extends PreferenceActivity ...@@ -288,7 +288,7 @@ public class Settings extends PreferenceActivity
builder.addWord(puncs.subSequence(i, i + 1)); builder.addWord(puncs.subSequence(i, i + 1));
} }
} }
return builder.build(); return builder.setIsPunctuationSuggestions().build();
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment