Adds AdvantagePicker and ProficiencyPicker components.

This commit is contained in:
2021-05-31 12:56:58 -07:00
parent aa850ecfc6
commit 1c5762405a
5 changed files with 300 additions and 0 deletions

View File

@@ -0,0 +1,48 @@
<?xml version="1.0" encoding="utf-8"?>
<merge xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/text_margin"
tools:context=".ui.components.AdvantagePicker">
<TextView
android:id="@+id/label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/label_advantage"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:text="Proficiency" />
<RadioGroup
android:id="@+id/group"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@id/label">
<com.google.android.material.radiobutton.MaterialRadioButton
android:id="@+id/none"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/label_advantage_none" />
<com.google.android.material.radiobutton.MaterialRadioButton
android:id="@+id/advantage"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/label_advantage_advantage" />
<com.google.android.material.radiobutton.MaterialRadioButton
android:id="@+id/disadvantage"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/label_advantage_disadvantage" />
</RadioGroup>
</merge>

View File

@@ -0,0 +1,48 @@
<?xml version="1.0" encoding="utf-8"?>
<merge xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/text_margin"
tools:context=".ui.components.ProficiencyPicker">
<TextView
android:id="@+id/label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/label_proficiency"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:text="Proficiency" />
<RadioGroup
android:id="@+id/group"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@id/label">
<com.google.android.material.radiobutton.MaterialRadioButton
android:id="@+id/none"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/label_proficiency_none" />
<com.google.android.material.radiobutton.MaterialRadioButton
android:id="@+id/proficient"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/label_proficiency_proficient" />
<com.google.android.material.radiobutton.MaterialRadioButton
android:id="@+id/expertise"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/label_proficiency_expertise" />
</RadioGroup>
</merge>

View File

@@ -12,6 +12,10 @@
<string name="label_ability_scores">Ability Scores</string>
<string name="label_abilities">Abilities</string>
<string name="label_actions">Actions</string>
<string name="label_advantage">Advantage</string>
<string name="label_advantage_advantage">Advantage</string>
<string name="label_advantage_disadvantage">Disadvantage</string>
<string name="label_advantage_none">None</string>
<string name="label_alignment">Alignment</string>
<string name="label_armor">Armor</string>
<string name="label_base_speed">Base Speed</string>
@@ -42,6 +46,10 @@
<string name="label_legendary_actions">Legendary Actions</string>
<string name="label_natural_armor_bonus">Natural Armor Bonus</string>
<string name="label_name">Name</string>
<string name="label_proficiency">Proficiency</string>
<string name="label_proficiency_expertise">Expertise</string>
<string name="label_proficiency_none">None</string>
<string name="label_proficiency_proficient">Proficient</string>
<string name="label_reactions">Reactions</string>
<string name="label_regional_actions">Regional Actions</string>
<string name="label_saving_throws">Saving Throws</string>