Adds screen to edit ability scores.

This commit is contained in:
2021-05-30 01:55:45 -07:00
parent bc115efba8
commit 5a94408f7b
6 changed files with 532 additions and 1 deletions

View File

@@ -0,0 +1,269 @@
<?xml version="1.0" encoding="utf-8"?>
<ScrollView 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="match_parent"
tools:context=".ui.editmonster.EditBasicInfoFragment">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/text_margin">
<TextView
android:id="@+id/strength"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:text="20 ft." />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/label_strength"
android:textAppearance="?attr/textAppearanceSubtitle1"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<Button
android:id="@+id/strength_decrement"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/label_decrement_field"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@id/strength_increment"
app:layout_constraintTop_toTopOf="parent" />
<Button
android:id="@+id/strength_increment"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/label_increment_field"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/text_margin">
<TextView
android:id="@+id/dexterity"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:text="20 ft." />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/label_dexterity"
android:textAppearance="?attr/textAppearanceSubtitle1"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<Button
android:id="@+id/dexterity_decrement"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/label_decrement_field"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@id/dexterity_increment"
app:layout_constraintTop_toTopOf="parent" />
<Button
android:id="@+id/dexterity_increment"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/label_increment_field"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/text_margin">
<TextView
android:id="@+id/constitution"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:text="20 ft." />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/label_constitution"
android:textAppearance="?attr/textAppearanceSubtitle1"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<Button
android:id="@+id/constitution_decrement"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/label_decrement_field"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@id/constitution_increment"
app:layout_constraintTop_toTopOf="parent" />
<Button
android:id="@+id/constitution_increment"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/label_increment_field"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/text_margin">
<TextView
android:id="@+id/intelligence"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:text="20 ft." />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/label_intelligence"
android:textAppearance="?attr/textAppearanceSubtitle1"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<Button
android:id="@+id/intelligence_decrement"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/label_decrement_field"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@id/intelligence_increment"
app:layout_constraintTop_toTopOf="parent" />
<Button
android:id="@+id/intelligence_increment"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/label_increment_field"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/text_margin">
<TextView
android:id="@+id/wisdom"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:text="20 ft." />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/label_wisdom"
android:textAppearance="?attr/textAppearanceSubtitle1"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<Button
android:id="@+id/wisdom_decrement"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/label_decrement_field"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@id/wisdom_increment"
app:layout_constraintTop_toTopOf="parent" />
<Button
android:id="@+id/wisdom_increment"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/label_increment_field"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/text_margin">
<TextView
android:id="@+id/charisma"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:text="20 ft." />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/label_charisma"
android:textAppearance="?attr/textAppearanceSubtitle1"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<Button
android:id="@+id/charisma_decrement"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/label_decrement_field"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@id/charisma_increment"
app:layout_constraintTop_toTopOf="parent" />
<Button
android:id="@+id/charisma_increment"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/label_increment_field"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
</LinearLayout>
</ScrollView>

View File

@@ -81,6 +81,9 @@
<action
android:id="@+id/action_editMonsterFragment_to_editSpeedFragment"
app:destination="@id/editSpeedFragment" />
<action
android:id="@+id/action_editMonsterFragment_to_editAbilityScoresFragment"
app:destination="@id/editAbilityScoresFragment" />
</fragment>
<fragment
android:id="@+id/editBasicInfoFragment"
@@ -97,6 +100,10 @@
android:name="com.majinnaibu.monstercards.ui.editmonster.EditSpeedFragment"
android:label="fragment_edit_speed"
tools:layout="@layout/fragment_edit_speed" />
<fragment
android:id="@+id/editAbilityScoresFragment"
android:name="com.majinnaibu.monstercards.ui.editmonster.EditAbilityScoresFragment"
android:label="EditAbilityScoresFragment" />
</navigation>
</navigation>

View File

@@ -19,8 +19,10 @@
<string name="label_burrow_speed">Burrow Speed</string>
<string name="label_can_hover">Can Hover</string>
<string name="label_challenge_rating">Challenge Rating</string>
<string name="label_charisma">Charisma</string>
<string name="label_climb_speed">Climb Speed</string>
<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_hp">Custom HP</string>
<string name="label_custom_speed">Custom Speed</string>
@@ -28,11 +30,13 @@
<string name="label_damage_resistances">Damage Resistances</string>
<string name="label_damage_vulnerabilities">Damage Vulnerabilities</string>
<string name="label_decrement_field">-</string>
<string name="label_dexterity">Dexterity</string>
<string name="label_has_custom_hp">Has Custom HP</string>
<string name="label_has_custom_speed">Has Custom Speed</string>
<string name="label_has_a_shield">Has a Shield</string>
<string name="label_hit_dice">Hit Dice</string>
<string name="label_increment_field">+</string>
<string name="label_intelligence">Intelligence</string>
<string name="label_lair_actions">Lair Actions</string>
<string name="label_languages">Languages</string>
<string name="label_legendary_actions">Legendary Actions</string>
@@ -47,8 +51,10 @@
<string name="label_size">Size</string>
<string name="label_skills">Skills</string>
<string name="label_speed">Speed</string>
<string name="label_strength">Strength</string>
<string name="label_subtype">Subtype</string>
<string name="label_type">Type</string>
<string name="label_wisdom">Wisdom</string>
<string name="section_divider">section divider</string>
<string name="snackbar_failed_to_create_monster">Failed to create monster</string>
<string name="snackbar_monster_created">%1$s created</string>
@@ -59,4 +65,5 @@
<string name="title_library">Library</string>
<string name="title_search">Search</string>
<string name="wisdom_abbreviation">WIS</string>
</resources>