Update suggestion strip drawables

Bug: 3286297
Change-Id: I51d4051ea22c465f81852e4fb98e48bad9cf57f1
main
Tadashi G. Takaoka 2010-12-15 16:53:37 +09:00
parent 1d11e7903f
commit e9311bc893
6 changed files with 162 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1003 B

View File

@ -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>

View File

@ -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>

View File

@ -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" />

View File

@ -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>

View File

@ -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));