From 2743a8337b52e132efc1e9a52496beac937f0f94 Mon Sep 17 00:00:00 2001 From: Tom Hicks Date: Thu, 1 Jul 2021 02:21:41 -0700 Subject: [PATCH] Makes radio buttons suck less. Styles the advantage picker and proficiency picker. Makes the saving throws screen nicer. --- .../res/layout/component_advantage_picker.xml | 40 +++- .../layout/component_proficiency_picker.xml | 40 +++- .../layout/fragment_edit_saving_throws.xml | 196 ++++++++++++------ Android/app/src/main/res/values/colors.xml | 17 +- Android/app/src/main/res/values/dimens.xml | 8 +- 5 files changed, 215 insertions(+), 86 deletions(-) diff --git a/Android/app/src/main/res/layout/component_advantage_picker.xml b/Android/app/src/main/res/layout/component_advantage_picker.xml index ad1339b..29c0fe9 100644 --- a/Android/app/src/main/res/layout/component_advantage_picker.xml +++ b/Android/app/src/main/res/layout/component_advantage_picker.xml @@ -6,16 +6,17 @@ android:layout_height="wrap_content" android:layout_margin="@dimen/text_margin" tools:context=".ui.components.AdvantagePicker"> - + app:layout_constraintTop_toTopOf="parent" /> + android:background="@drawable/radio_button_selector" + android:button="@android:color/transparent" + android:gravity="center" + android:padding="@dimen/padding_normal" + android:text="@string/label_advantage_none" + android:textAppearance="@android:style/TextAppearance.Material.Button" + android:textColor="@color/radio_button_text" + tools:checked="true" /> + android:background="@drawable/radio_button_selector" + android:button="@android:color/transparent" + android:gravity="center" + android:padding="@dimen/padding_normal" + android:text="@string/label_advantage_advantage" + android:textAppearance="@android:style/TextAppearance.Material.Button" + android:textColor="@color/radio_button_text" + tools:checked="false" /> + android:background="@drawable/radio_button_selector" + android:button="@android:color/transparent" + android:gravity="center" + android:padding="@dimen/padding_normal" + android:text="@string/label_advantage_disadvantage" + android:textAppearance="@android:style/TextAppearance.Material.Button" + android:textColor="@color/radio_button_text" + tools:checked="false" /> diff --git a/Android/app/src/main/res/layout/component_proficiency_picker.xml b/Android/app/src/main/res/layout/component_proficiency_picker.xml index 390b27e..608f569 100644 --- a/Android/app/src/main/res/layout/component_proficiency_picker.xml +++ b/Android/app/src/main/res/layout/component_proficiency_picker.xml @@ -6,16 +6,17 @@ android:layout_height="wrap_content" android:layout_margin="@dimen/text_margin" tools:context=".ui.components.ProficiencyPicker"> - + app:layout_constraintTop_toTopOf="parent" /> + android:background="@drawable/radio_button_selector" + android:button="@android:color/transparent" + android:gravity="center" + android:padding="@dimen/padding_normal" + android:text="@string/label_proficiency_none" + android:textAppearance="@android:style/TextAppearance.Material.Button" + android:textColor="@color/radio_button_text" + tools:checked="true" /> + android:background="@drawable/radio_button_selector" + android:button="@android:color/transparent" + android:gravity="center" + android:padding="@dimen/padding_normal" + android:text="@string/label_proficiency_proficient" + android:textAppearance="@android:style/TextAppearance.Material.Button" + android:textColor="@color/radio_button_text" + tools:checked="false" /> + android:background="@drawable/radio_button_selector" + android:button="@android:color/transparent" + android:gravity="center" + android:padding="@dimen/padding_normal" + android:text="@string/label_proficiency_expertise" + android:textAppearance="@android:style/TextAppearance.Material.Button" + android:textColor="@color/radio_button_text" + tools:checked="false" /> diff --git a/Android/app/src/main/res/layout/fragment_edit_saving_throws.xml b/Android/app/src/main/res/layout/fragment_edit_saving_throws.xml index 61b2c03..7d9df22 100644 --- a/Android/app/src/main/res/layout/fragment_edit_saving_throws.xml +++ b/Android/app/src/main/res/layout/fragment_edit_saving_throws.xml @@ -3,109 +3,169 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" + tools:context=".ui.editmonster.EditSavingThrowsFragment"> + android:divider="?android:attr/dividerVertical" + android:orientation="vertical" + android:showDividers="middle"> - + android:layout_marginTop="@dimen/padding_large" + android:layout_marginBottom="@dimen/padding_normal" + android:orientation="vertical"> - + - + - + + + + android:layout_marginTop="@dimen/padding_large" + android:layout_marginBottom="@dimen/padding_normal" + android:orientation="vertical"> - + - + - + + + + + android:layout_marginTop="@dimen/padding_large" + android:layout_marginBottom="@dimen/padding_normal" + android:orientation="vertical"> - + - + - + + + + + android:layout_marginTop="@dimen/padding_large" + android:layout_marginBottom="@dimen/padding_normal" + android:orientation="vertical"> - + - + - + + + + + android:layout_marginTop="@dimen/padding_large" + android:layout_marginBottom="@dimen/padding_normal" + android:orientation="vertical"> - + - + - + + + + + android:layout_marginTop="@dimen/padding_large" + android:layout_marginBottom="@dimen/padding_normal" + android:orientation="vertical"> - + - + + + - \ No newline at end of file + diff --git a/Android/app/src/main/res/values/colors.xml b/Android/app/src/main/res/values/colors.xml index ba0ed7c..196b818 100644 --- a/Android/app/src/main/res/values/colors.xml +++ b/Android/app/src/main/res/values/colors.xml @@ -1,8 +1,17 @@ - #9B2818 - #661A10 - + + #9b2818 + #d25941 + #660000 + #ea7e00 + #ffae41 + #b15000 + #ffffff + #000000 + #ffffff + #000000 + #995500 @@ -14,4 +23,4 @@ #007AFF #5855D6 #FF2D55 - \ No newline at end of file + diff --git a/Android/app/src/main/res/values/dimens.xml b/Android/app/src/main/res/values/dimens.xml index c6c3b92..681f490 100644 --- a/Android/app/src/main/res/values/dimens.xml +++ b/Android/app/src/main/res/values/dimens.xml @@ -3,5 +3,9 @@ 16dp 16dp 20sp - - \ No newline at end of file + 4dp + 4dp + 8dp + 16dp + 32dp +