Adds ability to edit languages.

This commit is contained in:
Tom Hicks
2021-06-25 10:57:25 -07:00
parent 34e11d97e5
commit 5289bac908
11 changed files with 83 additions and 48 deletions

View File

@@ -25,12 +25,11 @@
tools:text="Medicine" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.switchmaterial.SwitchMaterial
<CheckBox
android:id="@+id/canSpeak"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/text_margin"
android:text="@string/label_can_speak_language"
android:textAppearance="@android:style/TextAppearance.Material.Medium" />
android:text="@string/label_can_speak_language" />
</LinearLayout>
</ScrollView>

View File

@@ -3,7 +3,7 @@
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_height="match_parent"
android:orientation="vertical">
<!-- understands but textbox -->
@@ -33,4 +33,4 @@
app:maxValue="1000"
app:minValue="0"
app:stepAmount="5" />
</LinearLayout>
</LinearLayout>

View File

@@ -6,8 +6,8 @@
<TextView
android:id="@+id/content"
android:layout_width="match_parent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="@dimen/text_margin"
android:textAppearance="?attr/textAppearanceListItem" />
</LinearLayout>
</LinearLayout>

View File

@@ -108,6 +108,9 @@
<action
android:id="@+id/action_editMonsterFragment_to_editDamageImmunitiesFragment"
app:destination="@id/editDamageImmunitiesFragment" />
<action
android:id="@+id/action_editMonsterFragment_to_editLanguagesFragment"
app:destination="@id/editLanguagesFragment" />
</fragment>
<fragment
android:id="@+id/editBasicInfoFragment"
@@ -251,5 +254,26 @@
android:id="@+id/action_editDamageVulnerabilitiesFragment_to_editDamageVulnerabilityFragment"
app:destination="@id/editDamageVulnerabilityFragment" />
</fragment>
<fragment
android:id="@+id/editLanguagesFragment"
android:name="com.majinnaibu.monstercards.ui.editmonster.EditLanguagesFragment"
android:label="fragment_edit_languages_list"
tools:layout="@layout/fragment_edit_languages_list">
<action
android:id="@+id/action_editLanguagesFragment_to_editLanguageFragment"
app:destination="@id/editLanguageFragment" />
</fragment>
<fragment
android:id="@+id/editLanguageFragment"
android:name="com.majinnaibu.monstercards.ui.editmonster.EditLanguageFragment"
android:label="fragment_edit_language"
tools:layout="@layout/fragment_edit_language">
<argument
android:name="name"
app:argType="string" />
<argument
android:name="canSpeak"
app:argType="boolean" />
</fragment>
</navigation>
</navigation>

View File

@@ -2,6 +2,7 @@
<string name="action_add_monster">Add monster</string>
<string name="action_add_sense">Add Sense</string>
<string name="action_add_skill">Add Skill</string>
<string name="action_add_language">Add Language</string>
<string name="action_add_condition_immunity">Add Condition</string>
<string name="action_edit">Edit</string>
<string name="actions_label">Actions</string>
@@ -52,6 +53,7 @@
<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_understands_but">Understands But</string>
<string name="label_proficiency">Proficiency</string>
<string name="label_proficiency_expertise">Expertise</string>
<string name="label_proficiency_none">None</string>
@@ -68,6 +70,7 @@
<string name="label_strength">Strength</string>
<string name="label_subtype">Subtype</string>
<string name="label_swim_speed">Swim Speed</string>
<string name="label_telepathy">Telepathy</string>
<string name="label_type">Type</string>
<string name="label_wisdom">Wisdom</string>
<string name="section_divider">section divider</string>
@@ -83,4 +86,5 @@
<string name="label_description">Description</string>
<string name="label_damage_type">Damage Type</string>
<string name="add_damage_type">Add Damage Type</string>
<string name="label_can_speak_language">Can Speak</string>
</resources>