Adds edit skill fragment to edit individual skills.

This commit is contained in:
2021-06-20 00:51:56 -07:00
parent 547b20292f
commit 3a3f78a31e
5 changed files with 279 additions and 4 deletions

View File

@@ -0,0 +1,46 @@
<?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.EditSkillFragment">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<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/name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/label_name"
android:importantForAutofill="no"
android:inputType="textCapWords"
tools:text="Medicine" />
</com.google.android.material.textfield.TextInputLayout>
<com.majinnaibu.monstercards.ui.components.AbilityScorePicker
android:id="@+id/abilityScore"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/text_margin" />
<com.majinnaibu.monstercards.ui.components.ProficiencyPicker
android:id="@+id/proficiency"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/text_margin" />
<com.majinnaibu.monstercards.ui.components.AdvantagePicker
android:id="@+id/advantage"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/text_margin" />
</LinearLayout>
</ScrollView>

View File

@@ -127,7 +127,28 @@
android:id="@+id/editSkillsFragment"
android:name="com.majinnaibu.monstercards.ui.editmonster.EditSkillsFragment"
android:label="fragment_edit_skills_list"
tools:layout="@layout/fragment_edit_skills_list" />
tools:layout="@layout/fragment_edit_skills_list">
<action
android:id="@+id/action_editSkillsFragment_to_editSkillFragment"
app:destination="@id/editSkillFragment" />
</fragment>
<fragment
android:id="@+id/editSkillFragment"
android:name="com.majinnaibu.monstercards.ui.editmonster.EditSkillFragment"
android:label="fragment_edit_skill"
tools:layout="@layout/fragment_edit_skill">
<argument
android:name="name"
app:argType="string" />
<argument
android:name="abilityScore"
app:argType="com.majinnaibu.monstercards.data.enums.AbilityScore" />
<argument
android:name="proficiency"
app:argType="com.majinnaibu.monstercards.data.enums.ProficiencyType" />
<argument
android:name="advantage"
app:argType="com.majinnaibu.monstercards.data.enums.AdvantageType" />
</fragment>
</navigation>
</navigation>
</navigation>