diff options
author | 2010-12-15 22:56:31 -0800 | |
---|---|---|
committer | 2010-12-15 22:56:31 -0800 | |
commit | 160d2ec4454b2440eff6ed050b1bf31943e94f45 (patch) | |
tree | 2ede909038dee46b38ce4f051c28edf0b4df254e /java | |
parent | dcfbab91e6b2764739042ab13bc21c1679514a01 (diff) | |
parent | e9311bc893c71f2a016d67ddb6b6234661e8a4f6 (diff) | |
download | latinime-160d2ec4454b2440eff6ed050b1bf31943e94f45.tar.gz latinime-160d2ec4454b2440eff6ed050b1bf31943e94f45.tar.xz latinime-160d2ec4454b2440eff6ed050b1bf31943e94f45.zip |
Merge "Update suggestion strip drawables"
Diffstat (limited to 'java')
-rw-r--r-- | java/res/drawable-mdpi/keyboard_suggest_strip_holo.9.png | bin | 0 -> 1003 bytes | |||
-rw-r--r-- | java/res/drawable/btn_candidate_holo.xml | 27 | ||||
-rw-r--r-- | java/res/layout-xlarge/candidate.xml | 60 | ||||
-rw-r--r-- | java/res/layout-xlarge/candidate_preview.xml | 29 | ||||
-rw-r--r-- | java/res/layout-xlarge/candidates.xml | 45 | ||||
-rw-r--r-- | java/src/com/android/inputmethod/latin/CandidateView.java | 1 |
6 files changed, 162 insertions, 0 deletions
diff --git a/java/res/drawable-mdpi/keyboard_suggest_strip_holo.9.png b/java/res/drawable-mdpi/keyboard_suggest_strip_holo.9.png Binary files differnew file mode 100644 index 000000000..bb58f00d0 --- /dev/null +++ b/java/res/drawable-mdpi/keyboard_suggest_strip_holo.9.png diff --git a/java/res/drawable/btn_candidate_holo.xml b/java/res/drawable/btn_candidate_holo.xml new file mode 100644 index 000000000..66cd2460b --- /dev/null +++ b/java/res/drawable/btn_candidate_holo.xml @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* +** +** Copyright 2010, 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" +> + <item + android:state_pressed="true" + android:drawable="@drawable/btn_keyboard_key_popup_selected_holo" /> +</selector> diff --git a/java/res/layout-xlarge/candidate.xml b/java/res/layout-xlarge/candidate.xml new file mode 100644 index 000000000..74532a1e2 --- /dev/null +++ b/java/res/layout-xlarge/candidate.xml @@ -0,0 +1,60 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* +** +** Copyright 2010, 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. +*/ +--> + +<LinearLayout + xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="match_parent" + android:layout_height="@dimen/candidate_strip_height" + android:orientation="horizontal" + android:paddingRight="@dimen/candidate_padding" +> + <ImageView + android:id="@+id/candidate_divider" + android:layout_width="wrap_content" + android:layout_height="@dimen/candidate_strip_height" + android:visibility="gone" + android:focusable="false" + android:clickable="false" + android:src="@drawable/keyboard_suggest_strip_divider" + android:gravity="center_vertical|center_horizontal" /> + <Button + android:id="@+id/candidate_word" + android:layout_width="wrap_content" + android:layout_height="@dimen/candidate_strip_height" + android:minWidth="@dimen/candidate_min_width" + android:textSize="@dimen/candidate_text_size" + android:textColor="@color/candidate_normal" + android:background="@drawable/btn_candidate_holo" + android:focusable="true" + android:clickable="true" + android:gravity="center_vertical|center_horizontal" + android:paddingLeft="@dimen/candidate_padding" /> + <TextView + android:id="@+id/candidate_debug_info" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:visibility="gone" + android:textSize="10dip" + android:textColor="#ff808080" + android:focusable="false" + android:clickable="false" + android:gravity="bottom" + android:paddingLeft="4dip" /> +</LinearLayout> diff --git a/java/res/layout-xlarge/candidate_preview.xml b/java/res/layout-xlarge/candidate_preview.xml new file mode 100644 index 000000000..61d5f8e7b --- /dev/null +++ b/java/res/layout-xlarge/candidate_preview.xml @@ -0,0 +1,29 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* +** +** Copyright 2010, 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. +*/ +--> + +<TextView + xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:textSize="18sp" + android:textColor="?android:attr/textColorPrimaryInverse" + android:minWidth="32dip" + android:gravity="center" + android:background="@drawable/keyboard_popup_panel_background_holo" /> diff --git a/java/res/layout-xlarge/candidates.xml b/java/res/layout-xlarge/candidates.xml new file mode 100644 index 000000000..e2ddb84b1 --- /dev/null +++ b/java/res/layout-xlarge/candidates.xml @@ -0,0 +1,45 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* +** +** Copyright 2010, 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. +*/ +--> + +<LinearLayout + xmlns:android="http://schemas.android.com/apk/res/android" + android:orientation="horizontal" + android:layout_width="match_parent" + android:layout_height="@dimen/candidate_strip_height" + android:background="@drawable/keyboard_suggest_strip_holo" + android:paddingRight="@dimen/candidate_strip_padding" + android:paddingLeft="@dimen/candidate_strip_padding" +> + <HorizontalScrollView + android:id="@+id/candidates_scroll_view" + android:layout_width="wrap_content" + android:layout_height="@dimen/candidate_strip_height" + android:fadingEdge="horizontal" + android:fadingEdgeLength="@dimen/candidate_strip_fading_edge_length" + android:scrollbars="none" + > + <com.android.inputmethod.latin.CandidateView + android:id="@+id/candidates" + android:orientation="horizontal" + android:layout_width="match_parent" + android:layout_height="@dimen/candidate_strip_height" + android:background="@drawable/keyboard_suggest_strip_holo" /> + </HorizontalScrollView> +</LinearLayout> diff --git a/java/src/com/android/inputmethod/latin/CandidateView.java b/java/src/com/android/inputmethod/latin/CandidateView.java index 784077a76..3f47ea370 100644 --- a/java/src/com/android/inputmethod/latin/CandidateView.java +++ b/java/src/com/android/inputmethod/latin/CandidateView.java @@ -282,6 +282,7 @@ public class CandidateView extends LinearLayout implements OnClickListener, OnLo return; final TextView previewText = mPreviewText; + previewText.setTextColor(mColorNormal); previewText.setText(word); previewText.measure(MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED), MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED)); |