Makes radio buttons suck less.
Styles the advantage picker and proficiency picker. Makes the saving throws screen nicer.
This commit is contained in:
		| @@ -6,16 +6,17 @@ | ||||
|     android:layout_height="wrap_content" | ||||
|     android:layout_margin="@dimen/text_margin" | ||||
|     tools:context=".ui.components.AdvantagePicker"> | ||||
|     <!-- // TODO: style this control to look less awful by default --> | ||||
|  | ||||
|     <TextView | ||||
|         android:id="@+id/label" | ||||
|         android:layout_width="wrap_content" | ||||
|         android:layout_height="wrap_content" | ||||
|         android:layout_marginHorizontal="@dimen/padding_normal" | ||||
|         android:layout_marginTop="@dimen/padding_small" | ||||
|         android:text="@string/label_advantage" | ||||
|         android:textAppearance="@android:style/TextAppearance.Material.Medium" | ||||
|         app:layout_constraintStart_toStartOf="parent" | ||||
|         app:layout_constraintTop_toTopOf="parent" | ||||
|         tools:text="Proficiency" /> | ||||
|         app:layout_constraintTop_toTopOf="parent" /> | ||||
|  | ||||
|     <RadioGroup | ||||
|         android:id="@+id/group" | ||||
| @@ -29,21 +30,48 @@ | ||||
|             android:id="@+id/none" | ||||
|             android:layout_width="0dp" | ||||
|             android:layout_height="wrap_content" | ||||
|             android:layout_marginHorizontal="@dimen/padding_small" | ||||
|             android:layout_marginVertical="@dimen/padding_normal" | ||||
|             android:layout_weight="1" | ||||
|             android:text="@string/label_advantage_none" /> | ||||
|             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" /> | ||||
|  | ||||
|         <com.google.android.material.radiobutton.MaterialRadioButton | ||||
|             android:id="@+id/advantage" | ||||
|             android:layout_width="0dp" | ||||
|             android:layout_height="wrap_content" | ||||
|             android:layout_marginHorizontal="@dimen/padding_small" | ||||
|             android:layout_marginVertical="@dimen/padding_normal" | ||||
|             android:layout_weight="1" | ||||
|             android:text="@string/label_advantage_advantage" /> | ||||
|             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" /> | ||||
|  | ||||
|         <com.google.android.material.radiobutton.MaterialRadioButton | ||||
|             android:id="@+id/disadvantage" | ||||
|             android:layout_width="0dp" | ||||
|             android:layout_height="wrap_content" | ||||
|             android:layout_marginHorizontal="@dimen/padding_small" | ||||
|             android:layout_marginVertical="@dimen/padding_normal" | ||||
|             android:layout_weight="1" | ||||
|             android:text="@string/label_advantage_disadvantage" /> | ||||
|             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" /> | ||||
|     </RadioGroup> | ||||
| </merge> | ||||
|   | ||||
| @@ -6,16 +6,17 @@ | ||||
|     android:layout_height="wrap_content" | ||||
|     android:layout_margin="@dimen/text_margin" | ||||
|     tools:context=".ui.components.ProficiencyPicker"> | ||||
|     <!-- // TODO: style this control to look less awful by default --> | ||||
|  | ||||
|     <TextView | ||||
|         android:id="@+id/label" | ||||
|         android:layout_width="wrap_content" | ||||
|         android:layout_height="wrap_content" | ||||
|         android:layout_marginHorizontal="@dimen/padding_normal" | ||||
|         android:layout_marginTop="@dimen/padding_small" | ||||
|         android:text="@string/label_proficiency" | ||||
|         android:textAppearance="@android:style/TextAppearance.Material.Medium" | ||||
|         app:layout_constraintStart_toStartOf="parent" | ||||
|         app:layout_constraintTop_toTopOf="parent" | ||||
|         tools:text="Proficiency" /> | ||||
|         app:layout_constraintTop_toTopOf="parent" /> | ||||
|  | ||||
|     <RadioGroup | ||||
|         android:id="@+id/group" | ||||
| @@ -29,21 +30,48 @@ | ||||
|             android:id="@+id/none" | ||||
|             android:layout_width="0dp" | ||||
|             android:layout_height="wrap_content" | ||||
|             android:layout_marginHorizontal="@dimen/padding_small" | ||||
|             android:layout_marginVertical="@dimen/padding_normal" | ||||
|             android:layout_weight="1" | ||||
|             android:text="@string/label_proficiency_none" /> | ||||
|             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" /> | ||||
|  | ||||
|         <com.google.android.material.radiobutton.MaterialRadioButton | ||||
|             android:id="@+id/proficient" | ||||
|             android:layout_width="0dp" | ||||
|             android:layout_height="wrap_content" | ||||
|             android:layout_marginHorizontal="@dimen/padding_small" | ||||
|             android:layout_marginVertical="@dimen/padding_normal" | ||||
|             android:layout_weight="1" | ||||
|             android:text="@string/label_proficiency_proficient" /> | ||||
|             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" /> | ||||
|  | ||||
|         <com.google.android.material.radiobutton.MaterialRadioButton | ||||
|             android:id="@+id/expertise" | ||||
|             android:layout_width="0dp" | ||||
|             android:layout_height="wrap_content" | ||||
|             android:layout_marginHorizontal="@dimen/padding_small" | ||||
|             android:layout_marginVertical="@dimen/padding_normal" | ||||
|             android:layout_weight="1" | ||||
|             android:text="@string/label_proficiency_expertise" /> | ||||
|             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" /> | ||||
|     </RadioGroup> | ||||
| </merge> | ||||
|   | ||||
| @@ -3,18 +3,29 @@ | ||||
|     xmlns:tools="http://schemas.android.com/tools" | ||||
|     android:layout_width="match_parent" | ||||
|     android:layout_height="match_parent" | ||||
|  | ||||
|     tools:context=".ui.editmonster.EditSavingThrowsFragment"> | ||||
|  | ||||
|     <LinearLayout | ||||
|         android:layout_width="match_parent" | ||||
|         android:layout_height="wrap_content" | ||||
|         android:divider="?android:attr/dividerVertical" | ||||
|         android:orientation="vertical" | ||||
|         android:showDividers="middle"> | ||||
|  | ||||
|         <LinearLayout | ||||
|             android:layout_width="match_parent" | ||||
|             android:layout_height="wrap_content" | ||||
|             android:layout_marginTop="@dimen/padding_large" | ||||
|             android:layout_marginBottom="@dimen/padding_normal" | ||||
|             android:orientation="vertical"> | ||||
|  | ||||
|             <TextView | ||||
|                 android:layout_width="match_parent" | ||||
|                 android:layout_height="wrap_content" | ||||
|             android:layout_gravity="start" | ||||
|             android:text="@string/label_strength" /> | ||||
|                 android:gravity="center_horizontal" | ||||
|                 android:text="@string/label_strength" | ||||
|                 android:textAppearance="@android:style/TextAppearance.Material.Title" /> | ||||
|  | ||||
|             <com.majinnaibu.monstercards.ui.components.ProficiencyPicker | ||||
|                 android:id="@+id/strengthProficiency" | ||||
| @@ -25,12 +36,21 @@ | ||||
|                 android:id="@+id/strengthAdvantage" | ||||
|                 android:layout_width="match_parent" | ||||
|                 android:layout_height="wrap_content" /> | ||||
|         </LinearLayout> | ||||
|  | ||||
|         <LinearLayout | ||||
|             android:layout_width="match_parent" | ||||
|             android:layout_height="wrap_content" | ||||
|             android:layout_marginTop="@dimen/padding_large" | ||||
|             android:layout_marginBottom="@dimen/padding_normal" | ||||
|             android:orientation="vertical"> | ||||
|  | ||||
|             <TextView | ||||
|                 android:layout_width="match_parent" | ||||
|                 android:layout_height="wrap_content" | ||||
|             android:layout_gravity="start" | ||||
|             android:text="@string/label_dexterity" /> | ||||
|                 android:gravity="center_horizontal" | ||||
|                 android:text="@string/label_dexterity" | ||||
|                 android:textAppearance="@android:style/TextAppearance.Material.Title" /> | ||||
|  | ||||
|             <com.majinnaibu.monstercards.ui.components.ProficiencyPicker | ||||
|                 android:id="@+id/dexterityProficiency" | ||||
| @@ -42,11 +62,21 @@ | ||||
|                 android:layout_width="match_parent" | ||||
|                 android:layout_height="wrap_content" /> | ||||
|  | ||||
|         </LinearLayout> | ||||
|  | ||||
|         <LinearLayout | ||||
|             android:layout_width="match_parent" | ||||
|             android:layout_height="wrap_content" | ||||
|             android:layout_marginTop="@dimen/padding_large" | ||||
|             android:layout_marginBottom="@dimen/padding_normal" | ||||
|             android:orientation="vertical"> | ||||
|  | ||||
|             <TextView | ||||
|                 android:layout_width="match_parent" | ||||
|                 android:layout_height="wrap_content" | ||||
|             android:layout_gravity="start" | ||||
|             android:text="@string/label_constitution" /> | ||||
|                 android:gravity="center_horizontal" | ||||
|                 android:text="@string/label_constitution" | ||||
|                 android:textAppearance="@android:style/TextAppearance.Material.Title" /> | ||||
|  | ||||
|             <com.majinnaibu.monstercards.ui.components.ProficiencyPicker | ||||
|                 android:id="@+id/constitutionProficiency" | ||||
| @@ -58,11 +88,21 @@ | ||||
|                 android:layout_width="match_parent" | ||||
|                 android:layout_height="wrap_content" /> | ||||
|  | ||||
|         </LinearLayout> | ||||
|  | ||||
|         <LinearLayout | ||||
|             android:layout_width="match_parent" | ||||
|             android:layout_height="wrap_content" | ||||
|             android:layout_marginTop="@dimen/padding_large" | ||||
|             android:layout_marginBottom="@dimen/padding_normal" | ||||
|             android:orientation="vertical"> | ||||
|  | ||||
|             <TextView | ||||
|                 android:layout_width="match_parent" | ||||
|                 android:layout_height="wrap_content" | ||||
|             android:layout_gravity="start" | ||||
|             android:text="@string/label_intelligence" /> | ||||
|                 android:gravity="center_horizontal" | ||||
|                 android:text="@string/label_intelligence" | ||||
|                 android:textAppearance="@android:style/TextAppearance.Material.Title" /> | ||||
|  | ||||
|             <com.majinnaibu.monstercards.ui.components.ProficiencyPicker | ||||
|                 android:id="@+id/intelligenceProficiency" | ||||
| @@ -74,11 +114,21 @@ | ||||
|                 android:layout_width="match_parent" | ||||
|                 android:layout_height="wrap_content" /> | ||||
|  | ||||
|         </LinearLayout> | ||||
|  | ||||
|         <LinearLayout | ||||
|             android:layout_width="match_parent" | ||||
|             android:layout_height="wrap_content" | ||||
|             android:layout_marginTop="@dimen/padding_large" | ||||
|             android:layout_marginBottom="@dimen/padding_normal" | ||||
|             android:orientation="vertical"> | ||||
|  | ||||
|             <TextView | ||||
|                 android:layout_width="match_parent" | ||||
|                 android:layout_height="wrap_content" | ||||
|             android:layout_gravity="start" | ||||
|             android:text="@string/label_wisdom" /> | ||||
|                 android:gravity="center_horizontal" | ||||
|                 android:text="@string/label_wisdom" | ||||
|                 android:textAppearance="@android:style/TextAppearance.Material.Title" /> | ||||
|  | ||||
|             <com.majinnaibu.monstercards.ui.components.ProficiencyPicker | ||||
|                 android:id="@+id/wisdomProficiency" | ||||
| @@ -90,11 +140,21 @@ | ||||
|                 android:layout_width="match_parent" | ||||
|                 android:layout_height="wrap_content" /> | ||||
|  | ||||
|         </LinearLayout> | ||||
|  | ||||
|         <LinearLayout | ||||
|             android:layout_width="match_parent" | ||||
|             android:layout_height="wrap_content" | ||||
|             android:layout_marginTop="@dimen/padding_large" | ||||
|             android:layout_marginBottom="@dimen/padding_normal" | ||||
|             android:orientation="vertical"> | ||||
|  | ||||
|             <TextView | ||||
|                 android:layout_width="match_parent" | ||||
|                 android:layout_height="wrap_content" | ||||
|             android:layout_gravity="start" | ||||
|             android:text="@string/label_charisma" /> | ||||
|                 android:gravity="center_horizontal" | ||||
|                 android:text="@string/label_charisma" | ||||
|                 android:textAppearance="@android:style/TextAppearance.Material.Title" /> | ||||
|  | ||||
|             <com.majinnaibu.monstercards.ui.components.ProficiencyPicker | ||||
|                 android:id="@+id/charismaProficiency" | ||||
| @@ -105,7 +165,7 @@ | ||||
|                 android:id="@+id/charismaAdvantage" | ||||
|                 android:layout_width="match_parent" | ||||
|                 android:layout_height="wrap_content" /> | ||||
|  | ||||
|         </LinearLayout> | ||||
|     </LinearLayout> | ||||
|  | ||||
| </ScrollView> | ||||
| @@ -1,8 +1,17 @@ | ||||
| <?xml version="1.0" encoding="utf-8"?> | ||||
| <resources> | ||||
|     <color name="colorPrimary">#9B2818</color> | ||||
|     <color name="colorPrimaryDark">#661A10</color> | ||||
|     <!--    <color name="colorAccent">#188B9B</color>--> | ||||
|     <!-- From palette here https://material.io/resources/color/#!/?view.left=1&view.right=1&primary.color=9b2818&secondary.color=ea7e00 --> | ||||
|     <color name="colorPrimary">#9b2818</color> | ||||
|     <color name="colorPrimaryLight">#d25941</color> | ||||
|     <color name="colorPrimaryDark">#660000</color> | ||||
|     <color name="colorSecondary">#ea7e00</color> | ||||
|     <color name="colorSecondaryLight">#ffae41</color> | ||||
|     <color name="colorSecondaryDark">#b15000</color> | ||||
|     <color name="colorOnPrimary">#ffffff</color> | ||||
|     <color name="colorOnSecondary">#000000</color> | ||||
|     <color name="colorOnLight">#ffffff</color> | ||||
|     <color name="colorOnDark">#000000</color> | ||||
|  | ||||
|     <color name="colorAccent">#995500</color> | ||||
|  | ||||
|     <!-- fruit system colors --> | ||||
|   | ||||
| @@ -3,5 +3,9 @@ | ||||
|     <dimen name="text_margin">16dp</dimen> | ||||
|     <dimen name="fab_margin">16dp</dimen> | ||||
|     <dimen name="text_h4_size">20sp</dimen> | ||||
|  | ||||
|     <dimen name="corner_radius">4dp</dimen> | ||||
|     <dimen name="padding_small">4dp</dimen> | ||||
|     <dimen name="padding_normal">8dp</dimen> | ||||
|     <dimen name="padding_large">16dp</dimen> | ||||
|     <dimen name="padding_huge">32dp</dimen> | ||||
| </resources> | ||||
		Reference in New Issue
	
	Block a user
	 Tom Hicks
					Tom Hicks