Adds ability editor.
This commit is contained in:
33
app/src/main/res/layout/fragment_edit_abilities_list.xml
Normal file
33
app/src/main/res/layout/fragment_edit_abilities_list.xml
Normal file
@@ -0,0 +1,33 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout 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.EditAbilitiesFragment">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:divider="?android:attr/dividerVertical"
|
||||
android:dividerPadding="@dimen/text_margin"
|
||||
app:layoutManager="LinearLayoutManager"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:listitem="@layout/fragment_edit_abilities_list_item" />
|
||||
|
||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
android:id="@+id/add_ability"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom|end"
|
||||
android:layout_margin="@dimen/fab_margin"
|
||||
android:contentDescription="@string/action_add_ability"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:srcCompat="@android:drawable/ic_input_add"
|
||||
app:tint="@android:color/white" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/content"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="@dimen/text_margin"
|
||||
android:textAppearance="?attr/textAppearanceListItem" />
|
||||
</LinearLayout>
|
||||
37
app/src/main/res/layout/fragment_edit_trait.xml
Normal file
37
app/src/main/res/layout/fragment_edit_trait.xml
Normal file
@@ -0,0 +1,37 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout 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"
|
||||
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="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/description"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/label_description"
|
||||
android:importantForAutofill="no"
|
||||
android:inputType="text"
|
||||
tools:text="John Doe" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
</LinearLayout>
|
||||
@@ -111,6 +111,9 @@
|
||||
<action
|
||||
android:id="@+id/action_editMonsterFragment_to_editLanguagesFragment"
|
||||
app:destination="@id/editLanguagesFragment" />
|
||||
<action
|
||||
android:id="@+id/action_editMonsterFragment_to_editAbilitiesFragment"
|
||||
app:destination="@id/editAbilitiesFragment" />
|
||||
</fragment>
|
||||
<fragment
|
||||
android:id="@+id/editBasicInfoFragment"
|
||||
@@ -275,5 +278,24 @@
|
||||
android:name="canSpeak"
|
||||
app:argType="boolean" />
|
||||
</fragment>
|
||||
<fragment
|
||||
android:id="@+id/editAbilitiesFragment"
|
||||
android:name="com.majinnaibu.monstercards.ui.editmonster.EditAbilitiesFragment"
|
||||
android:label="EditAbilitiesFragment" >
|
||||
<action
|
||||
android:id="@+id/action_editAbilitiesFragment_to_editAbilityFragment"
|
||||
app:destination="@id/editAbilityFragment" />
|
||||
</fragment>
|
||||
<fragment
|
||||
android:id="@+id/editAbilityFragment"
|
||||
android:name="com.majinnaibu.monstercards.ui.editmonster.EditAbilityFragment"
|
||||
android:label="EditAbilityFragment" >
|
||||
<argument
|
||||
android:name="description"
|
||||
app:argType="string" />
|
||||
<argument
|
||||
android:name="name"
|
||||
app:argType="string" />
|
||||
</fragment>
|
||||
</navigation>
|
||||
</navigation>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<resources>
|
||||
<string name="action_add_ability">Add Ability</string>
|
||||
<string name="action_add_condition_immunity">Add Condition</string>
|
||||
<string name="action_add_damage_type">Add Damage Type</string>
|
||||
<string name="action_add_language">Add Language</string>
|
||||
|
||||
Reference in New Issue
Block a user