Adds edit challenge rating screen.

This commit is contained in:
2021-05-31 20:23:39 -07:00
parent 8fc27a6d6e
commit 0e3f14f288
7 changed files with 170 additions and 17 deletions

View File

@@ -24,7 +24,6 @@
android:id="@+id/naturalArmorBonus"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:digits="0123456789"
android:hint="@string/label_natural_armor_bonus"
android:importantForAutofill="no"
android:inputType="numberSigned"
@@ -48,7 +47,6 @@
android:id="@+id/shieldBonus"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:digits="0123456789"
android:hint="@string/label_shield_bonus"
android:importantForAutofill="no"
android:inputType="numberSigned"

View File

@@ -0,0 +1,48 @@
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".ui.editmonster.EditChallengeRatingFragment">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<Spinner
android:id="@+id/challengeRating"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/text_margin">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/customChallengeRatingDescription"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/label_custom_challenge_rating_description"
android:importantForAutofill="no"
android:inputType="text"
tools:text="John Doe" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/text_margin">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/customProficiencyBonus"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/label_custom_proficiency_bonus"
android:importantForAutofill="no"
android:inputType="numberSigned"
tools:text="+2" />
</com.google.android.material.textfield.TextInputLayout>
</LinearLayout>
</ScrollView>

View File

@@ -87,6 +87,9 @@
<action
android:id="@+id/action_editMonsterFragment_to_editSavingThrowsFragment"
app:destination="@id/editSavingThrowsFragment" />
<action
android:id="@+id/action_editMonsterFragment_to_editChallengeRatingFragment"
app:destination="@id/editChallengeRatingFragment" />
</fragment>
<fragment
android:id="@+id/editBasicInfoFragment"
@@ -112,6 +115,11 @@
android:name="com.majinnaibu.monstercards.ui.editmonster.EditSavingThrowsFragment"
android:label="fragment_edit_saving_throws"
tools:layout="@layout/fragment_edit_saving_throws" />
<fragment
android:id="@+id/editChallengeRatingFragment"
android:name="com.majinnaibu.monstercards.ui.editmonster.EditChallengeRatingFragment"
android:label="fragment_edit_challenge_rating"
tools:layout="@layout/fragment_edit_challenge_rating" />
</navigation>
</navigation>

View File

@@ -28,7 +28,9 @@
<string name="label_condition_immunities">Condition Immunities</string>
<string name="label_constitution">Constitution</string>
<string name="label_custom_armor">Custom Armor</string>
<string name="label_custom_challenge_rating_description">Custom CR</string>
<string name="label_custom_hp">Custom HP</string>
<string name="label_custom_proficiency_bonus">Custom Proficiency Bonus</string>
<string name="label_custom_speed">Custom Speed</string>
<string name="label_damage_immunities">Damage Immunities</string>
<string name="label_damage_resistances">Damage Resistances</string>