diff options
author | 2013-04-18 15:11:33 +0900 | |
---|---|---|
committer | 2013-04-19 12:43:40 +0900 | |
commit | 30f102e297d4e4afc28b3aad688fe72e814452e7 (patch) | |
tree | 78c6a8d59c477ec68901348ce8a12e5df87f2fb9 /java | |
parent | 1f6e06cf9244cdd8803ee653f948e169c190b067 (diff) | |
download | latinime-30f102e297d4e4afc28b3aad688fe72e814452e7.tar.gz latinime-30f102e297d4e4afc28b3aad688fe72e814452e7.tar.xz latinime-30f102e297d4e4afc28b3aad688fe72e814452e7.zip |
Move some attributes of setup wizard layouts to style files
Change-Id: I7b5999253c959531212ee27ac1ddfe39de280e2c
Diffstat (limited to 'java')
-rw-r--r-- | java/res/layout/setup_step.xml | 28 | ||||
-rw-r--r-- | java/res/layout/setup_wizard.xml | 3 | ||||
-rw-r--r-- | java/res/values-v17/setup-styles.xml | 25 | ||||
-rw-r--r-- | java/res/values/setup-styles-common.xml | 57 | ||||
-rw-r--r-- | java/res/values/setup-styles.xml | 29 |
5 files changed, 88 insertions, 54 deletions
diff --git a/java/res/layout/setup_step.xml b/java/res/layout/setup_step.xml index c15d07bad..c6462e903 100644 --- a/java/res/layout/setup_step.xml +++ b/java/res/layout/setup_step.xml @@ -25,34 +25,14 @@ <TextView android:id="@+id/setup_step_title" style="@style/setupStepTitleStyle" - android:layout_width="match_parent" - android:layout_height="wrap_content" android:paddingTop="16dp" - android:paddingBottom="16dp" - android:paddingLeft="24dp" - android:paddingRight="24dp" /> + android:paddingBottom="16dp" /> <TextView android:id="@+id/setup_step_instruction" style="@style/setupStepInstructionStyle" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:paddingBottom="16dp" - android:paddingLeft="24dp" - android:paddingRight="24dp" /> - <View - android:layout_width="match_parent" - android:layout_height="2dp" /> - <Button + android:paddingBottom="16dp" /> + <TextView android:id="@+id/setup_step_action_label" style="@style/setupStepActionLabelStyle" - android:gravity="center_vertical" - android:drawablePadding="12dp" - android:layout_width="match_parent" - android:layout_height="48dp" - android:clickable="true" - android:focusable="true" - android:paddingLeft="12dp" - android:paddingStart="12dp" - android:paddingRight="24dp" - android:paddingEnd="24dp" /> + android:layout_marginTop="2dp" /> </LinearLayout> diff --git a/java/res/layout/setup_wizard.xml b/java/res/layout/setup_wizard.xml index 6e2d19f81..56d4d2fa8 100644 --- a/java/res/layout/setup_wizard.xml +++ b/java/res/layout/setup_wizard.xml @@ -33,10 +33,7 @@ <TextView android:id="@+id/setup_title" style="@style/setupTitleStyle" - android:layout_width="match_parent" - android:layout_height="wrap_content" android:layout_alignParentLeft="true" - android:layout_alignParentStart="true" android:layout_alignParentTop="true" /> <LinearLayout android:id="@+id/setup_step_bullets" diff --git a/java/res/values-v17/setup-styles.xml b/java/res/values-v17/setup-styles.xml new file mode 100644 index 000000000..8a9d66477 --- /dev/null +++ b/java/res/values-v17/setup-styles.xml @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2013 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. +--> + +<resources xmlns:android="http://schemas.android.com/apk/res/android"> + <style name="setupTitleStyle" parent="setupTitleStyleCommon"> + <item name="android:layout_alignParentStart">true</item> + </style> + <style name="setupStepActionLabelStyle" parent="setupStepActionLabelStyleCommon"> + <item name="android:paddingStart">12dp</item> + <item name="android:paddingEnd">24dp</item> + </style> +</resources> diff --git a/java/res/values/setup-styles-common.xml b/java/res/values/setup-styles-common.xml new file mode 100644 index 000000000..59a768a63 --- /dev/null +++ b/java/res/values/setup-styles-common.xml @@ -0,0 +1,57 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2013 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. +--> + +<resources xmlns:android="http://schemas.android.com/apk/res/android"> + <style name="setupTitleStyleCommon"> + <item name="android:textColor">@color/setup_text_dark</item> + <item name="android:textSize">@dimen/setup_title_text_size</item> + <item name="android:layout_width">match_parent</item> + <item name="android:layout_height">wrap_content</item> + </style> + <style name="setupStepBulletStyle"> + <item name="android:textColor">@color/setup_text_dark</item> + <item name="android:textSize">22sp</item> + <item name="android:layout_width">0dp</item> + <item name="android:layout_weight">1.0</item> + <item name="android:layout_height">wrap_content</item> + <item name="android:gravity">center_horizontal</item> + </style> + <style name="setupStepBaseStyle"> + <item name="android:textColor">@color/setup_text_dark</item> + <item name="android:background">@color/setup_step_background</item> + <item name="android:layout_width">match_parent</item> + <item name="android:layout_height">wrap_content</item> + <item name="android:paddingLeft">24dp</item> + <item name="android:paddingRight">24dp</item> + </style> + <style name="setupStepTitleStyle" parent="setupStepBaseStyle"> + <item name="android:textSize">22sp</item> + </style> + <style name="setupStepInstructionStyle" parent="setupStepBaseStyle"> + <item name="android:textSize">14sp</item> + </style> + <style name="setupStepActionLabelStyleCommon" parent="setupStepBaseStyle"> + <item name="android:textColor">@drawable/setup_step_action_color</item> + <item name="android:background">@drawable/setup_step_action_background</item> + <item name="android:layout_height">48dp</item> + <item name="android:paddingLeft">12dp</item> + <item name="android:textSize">18sp</item> + <item name="android:drawablePadding">12dp</item> + <item name="android:gravity">center_vertical</item> + <item name="android:clickable">true</item> + <item name="android:focusable">true</item> + </style> +</resources> diff --git a/java/res/values/setup-styles.xml b/java/res/values/setup-styles.xml index 420adcbb7..1ffe8ca46 100644 --- a/java/res/values/setup-styles.xml +++ b/java/res/values/setup-styles.xml @@ -15,31 +15,6 @@ --> <resources xmlns:android="http://schemas.android.com/apk/res/android"> - <style name="setupTitleStyle"> - <item name="android:textColor">@color/setup_text_dark</item> - <item name="android:textSize">@dimen/setup_title_text_size</item> - </style> - <style name="setupStepBulletStyle"> - <item name="android:textColor">@color/setup_text_dark</item> - <item name="android:textSize">22sp</item> - <item name="android:layout_width">0dp</item> - <item name="android:layout_weight">1.0</item> - <item name="android:layout_height">wrap_content</item> - <item name="android:gravity">center_horizontal</item> - </style> - <style name="setupStepTitleStyle"> - <item name="android:background">@color/setup_step_background</item> - <item name="android:textColor">@color/setup_text_dark</item> - <item name="android:textSize">22sp</item> - </style> - <style name="setupStepInstructionStyle"> - <item name="android:background">@color/setup_step_background</item> - <item name="android:textColor">@color/setup_text_dark</item> - <item name="android:textSize">14sp</item> - </style> - <style name="setupStepActionLabelStyle"> - <item name="android:background">@drawable/setup_step_action_background</item> - <item name="android:textColor">@drawable/setup_step_action_color</item> - <item name="android:textSize">18sp</item> - </style> + <style name="setupTitleStyle" parent="setupTitleStyleCommon" /> + <style name="setupStepActionLabelStyle" parent="setupStepActionLabelStyleCommon" /> </resources> |