aboutsummaryrefslogtreecommitdiffstats
path: root/java/res/layout
diff options
context:
space:
mode:
authorTadashi G. Takaoka <takaoka@google.com>2011-05-24 21:08:20 +0900
committerTadashi G. Takaoka <takaoka@google.com>2011-05-25 18:59:00 +0900
commit13a741999480343ccebd81ff6349b572bde17b07 (patch)
tree2f53327a78cfd8c16b1263d8165effe7f8fe1c4f /java/res/layout
parent6c4add55f94ff729ef1aa35c4f8df3b086344f8a (diff)
downloadlatinime-13a741999480343ccebd81ff6349b572bde17b07.tar.gz
latinime-13a741999480343ccebd81ff6349b572bde17b07.tar.xz
latinime-13a741999480343ccebd81ff6349b572bde17b07.zip
Use custom theme for Keyboard theme switch
This change reduces the number of layout files and make these theme-generic. This might be very helpful to re-design suggestion strip. Bug: 4175031 Change-Id: Idca10a4aa0bf7ac496eedd1879311e59780a423b
Diffstat (limited to 'java/res/layout')
-rw-r--r--java/res/layout/candidate.xml4
-rw-r--r--java/res/layout/candidate_preview.xml5
-rw-r--r--java/res/layout/candidates.xml2
-rw-r--r--java/res/layout/input_basic.xml38
-rw-r--r--java/res/layout/input_gingerbread.xml39
-rw-r--r--java/res/layout/input_honeycomb.xml46
-rw-r--r--java/res/layout/input_stone_bold.xml44
-rw-r--r--java/res/layout/input_stone_normal.xml43
-rw-r--r--java/res/layout/input_view.xml (renamed from java/res/layout/input_basic_highcontrast.xml)6
-rw-r--r--java/res/layout/key_preview.xml2
-rw-r--r--java/res/layout/key_preview_honeycomb.xml29
-rw-r--r--java/res/layout/keyboard_popup.xml8
-rw-r--r--java/res/layout/keyboard_popup_honeycomb.xml40
-rw-r--r--java/res/layout/keyboard_popup_stone.xml40
14 files changed, 9 insertions, 337 deletions
diff --git a/java/res/layout/candidate.xml b/java/res/layout/candidate.xml
index 5472a1dd1..aea34acf1 100644
--- a/java/res/layout/candidate.xml
+++ b/java/res/layout/candidate.xml
@@ -42,10 +42,10 @@
android:minWidth="@dimen/candidate_min_width"
android:textSize="@dimen/candidate_text_size"
android:textColor="@color/candidate_normal"
- android:background="@drawable/btn_candidate"
android:focusable="true"
android:clickable="true"
- android:gravity="center_vertical|center_horizontal" />
+ android:gravity="center_vertical|center_horizontal"
+ style="?attr/suggestionBackgroundStyle" />
<TextView
android:id="@+id/candidate_debug_info"
android:layout_width="wrap_content"
diff --git a/java/res/layout/candidate_preview.xml b/java/res/layout/candidate_preview.xml
index fe2002d46..32705c996 100644
--- a/java/res/layout/candidate_preview.xml
+++ b/java/res/layout/candidate_preview.xml
@@ -19,11 +19,10 @@
-->
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="wrap_content"
+ 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/candidate_feedback_background"
- />
+ style="?attr/suggestionPreviewBackgroundStyle" />
diff --git a/java/res/layout/candidates.xml b/java/res/layout/candidates.xml
index 5c29f737f..2bcafc985 100644
--- a/java/res/layout/candidates.xml
+++ b/java/res/layout/candidates.xml
@@ -32,10 +32,10 @@
<HorizontalScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:background="@drawable/keyboard_suggest_strip"
android:fadingEdge="horizontal"
android:fadingEdgeLength="@dimen/candidate_strip_fading_edge_length"
android:scrollbars="none"
+ style="?attr/suggestionsStripBackgroundStyle"
>
<com.android.inputmethod.latin.CandidateView
android:id="@+id/candidates"
diff --git a/java/res/layout/input_basic.xml b/java/res/layout/input_basic.xml
deleted file mode 100644
index ec2f60e9c..000000000
--- a/java/res/layout/input_basic.xml
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-**
-** Copyright 2008, 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"
- xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
- android:orientation="vertical"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
->
- <include
- layout="@layout/candidates" />
- <com.android.inputmethod.keyboard.LatinKeyboardView
- android:id="@+id/latin_keyboard_view"
- android:layout_alignParentBottom="true"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:padding="0dip"
- android:background="@drawable/keyboard_background"
- latin:keyBackground="@drawable/btn_keyboard_key" />
-</LinearLayout>
diff --git a/java/res/layout/input_gingerbread.xml b/java/res/layout/input_gingerbread.xml
deleted file mode 100644
index f620151cf..000000000
--- a/java/res/layout/input_gingerbread.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-<?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"
- xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
- android:orientation="vertical"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
->
- <include
- layout="@layout/candidates" />
- <com.android.inputmethod.keyboard.LatinKeyboardView
- android:id="@+id/latin_keyboard_view"
- android:layout_alignParentBottom="true"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:padding="0dip"
- android:background="@drawable/keyboard_dark_background"
- latin:keyBackground="@drawable/btn_keyboard_key_gingerbread"
- latin:keyLetterStyle="bold" />
-</LinearLayout>
diff --git a/java/res/layout/input_honeycomb.xml b/java/res/layout/input_honeycomb.xml
deleted file mode 100644
index 5a7dcb034..000000000
--- a/java/res/layout/input_honeycomb.xml
+++ /dev/null
@@ -1,46 +0,0 @@
-<?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"
- xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
- android:orientation="vertical"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
->
- <include
- layout="@layout/candidates" />
- <com.android.inputmethod.keyboard.LatinKeyboardView
- android:id="@+id/latin_keyboard_view"
- android:layout_alignParentBottom="true"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:padding="0dip"
- android:background="@drawable/keyboard_background_holo"
- latin:keyBackground="@drawable/btn_keyboard_key_honeycomb"
- latin:keyPreviewLayout="@layout/key_preview_honeycomb"
- latin:keyPreviewHeight="@dimen/key_preview_height_holo"
- latin:keyPreviewOffset="@dimen/key_preview_offset_holo"
- latin:popupLayout="@layout/keyboard_popup_honeycomb"
- latin:keyTextColorDisabled="#FF63666D"
- latin:keyLetterStyle="bold"
- latin:shadowColor="#00000000"
- latin:shadowRadius="0.0" />
-</LinearLayout>
diff --git a/java/res/layout/input_stone_bold.xml b/java/res/layout/input_stone_bold.xml
deleted file mode 100644
index ca0794cef..000000000
--- a/java/res/layout/input_stone_bold.xml
+++ /dev/null
@@ -1,44 +0,0 @@
-<?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"
- xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
- android:orientation="vertical"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
->
- <include
- layout="@layout/candidates" />
- <com.android.inputmethod.keyboard.LatinKeyboardView
- android:id="@+id/latin_keyboard_view"
- android:layout_alignParentBottom="true"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:padding="0dip"
- android:background="@drawable/keyboard_background"
- latin:keyBackground="@drawable/btn_keyboard_key_stone"
- latin:keyTextColor="@color/latinkeyboard_key_color_black"
- latin:keyTextColorDisabled="#FF808080"
- latin:shadowColor="@color/latinkeyboard_key_color_white"
- latin:keyLetterStyle="bold"
- latin:colorScheme="black"
- latin:popupLayout="@layout/keyboard_popup_stone" />
-</LinearLayout>
diff --git a/java/res/layout/input_stone_normal.xml b/java/res/layout/input_stone_normal.xml
deleted file mode 100644
index 9d5afb68b..000000000
--- a/java/res/layout/input_stone_normal.xml
+++ /dev/null
@@ -1,43 +0,0 @@
-<?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"
- xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
- android:orientation="vertical"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
->
- <include
- layout="@layout/candidates" />
- <com.android.inputmethod.keyboard.LatinKeyboardView
- android:id="@+id/latin_keyboard_view"
- android:layout_alignParentBottom="true"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:padding="0dip"
- android:background="@drawable/keyboard_background"
- latin:keyBackground="@drawable/btn_keyboard_key_stone"
- latin:keyTextColor="@color/latinkeyboard_key_color_black"
- latin:keyTextColorDisabled="#FF808080"
- latin:shadowColor="@color/latinkeyboard_key_color_white"
- latin:colorScheme="black"
- latin:popupLayout="@layout/keyboard_popup_stone" />
-</LinearLayout>
diff --git a/java/res/layout/input_basic_highcontrast.xml b/java/res/layout/input_view.xml
index 0a34b1fd7..c8820b02e 100644
--- a/java/res/layout/input_basic_highcontrast.xml
+++ b/java/res/layout/input_view.xml
@@ -2,7 +2,7 @@
<!--
/*
**
-** Copyright 2010, The Android Open Source Project
+** Copyright 2011, 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.
@@ -32,7 +32,5 @@
android:layout_alignParentBottom="true"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:padding="0dip"
- android:background="@android:color/black"
- latin:keyBackground="@drawable/btn_keyboard_key3" />
+ android:padding="0dip" />
</LinearLayout>
diff --git a/java/res/layout/key_preview.xml b/java/res/layout/key_preview.xml
index de03506ad..5032dd556 100644
--- a/java/res/layout/key_preview.xml
+++ b/java/res/layout/key_preview.xml
@@ -25,5 +25,5 @@
android:textColor="@color/latinkeyboard_key_color_white"
android:minWidth="32dip"
android:gravity="center"
- android:background="@drawable/keyboard_key_feedback"
+ style="?attr/keyPreviewStyle"
/>
diff --git a/java/res/layout/key_preview_honeycomb.xml b/java/res/layout/key_preview_honeycomb.xml
deleted file mode 100644
index 2fbfbb517..000000000
--- a/java/res/layout/key_preview_honeycomb.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-<?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="80sp"
- android:textSize="40sp"
- android:textColor="@color/latinkeyboard_key_color_white"
- android:minWidth="32dip"
- android:gravity="center"
- android:background="@drawable/keyboard_key_feedback_honeycomb"
- />
diff --git a/java/res/layout/keyboard_popup.xml b/java/res/layout/keyboard_popup.xml
index 0317d8deb..e2508da78 100644
--- a/java/res/layout/keyboard_popup.xml
+++ b/java/res/layout/keyboard_popup.xml
@@ -22,9 +22,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
- android:background="@drawable/keyboard_popup_panel_background"
- android:paddingLeft="@dimen/mini_keyboard_horizontal_padding"
- android:paddingRight="@dimen/mini_keyboard_horizontal_padding"
+ style="?attr/popupMiniKeyboardPanelStyle"
>
<com.android.inputmethod.keyboard.PopupMiniKeyboardView
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
@@ -32,9 +30,5 @@
android:layout_alignParentBottom="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
-
- latin:keyBackground="@drawable/btn_keyboard_key_gingerbread_popup"
- latin:keyHysteresisDistance="0dip"
- latin:verticalCorrection="@dimen/mini_keyboard_vertical_correction"
/>
</LinearLayout>
diff --git a/java/res/layout/keyboard_popup_honeycomb.xml b/java/res/layout/keyboard_popup_honeycomb.xml
deleted file mode 100644
index 2ddcbdc0c..000000000
--- a/java/res/layout/keyboard_popup_honeycomb.xml
+++ /dev/null
@@ -1,40 +0,0 @@
-<?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="wrap_content"
- android:layout_height="wrap_content"
- android:orientation="horizontal"
- android:background="@drawable/keyboard_popup_panel_background_holo"
- android:paddingLeft="@dimen/mini_keyboard_horizontal_padding_holo"
- android:paddingRight="@dimen/mini_keyboard_horizontal_padding_holo"
- >
- <com.android.inputmethod.keyboard.PopupMiniKeyboardView
- xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
- android:id="@+id/mini_keyboard_view"
- android:layout_alignParentBottom="true"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
-
- latin:keyBackground="@drawable/btn_keyboard_key_honeycomb_popup"
- latin:keyHysteresisDistance="0dip"
- latin:verticalCorrection="@dimen/mini_keyboard_vertical_correction"
- />
-</LinearLayout>
diff --git a/java/res/layout/keyboard_popup_stone.xml b/java/res/layout/keyboard_popup_stone.xml
deleted file mode 100644
index 94176b244..000000000
--- a/java/res/layout/keyboard_popup_stone.xml
+++ /dev/null
@@ -1,40 +0,0 @@
-<?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="wrap_content"
- android:orientation="horizontal"
- android:background="@drawable/keyboard_popup_panel_background"
- >
- <com.android.inputmethod.keyboard.PopupMiniKeyboardView
- xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
- android:id="@+id/mini_keyboard_view"
- android:layout_alignParentBottom="true"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:background="@drawable/keyboard_background"
-
- latin:keyBackground="@drawable/btn_keyboard_key_stone"
- latin:keyTextColor="@color/latinkeyboard_key_color_black"
- latin:shadowColor="@color/latinkeyboard_key_color_white"
- />
-</LinearLayout>