View cleanup.

Makes more numeric fields Steppers.
Sets titles for fragments.
Sets focus on the first EditText on most edit pages.
Makes Checkbox be a SwitchCompat
Fixes monster list item view.
This commit is contained in:
Tom Hicks
2021-06-26 02:37:37 -07:00
parent 36c26e4c42
commit 2427f69da9
28 changed files with 258 additions and 124 deletions

View File

@@ -7,13 +7,19 @@
android:layout_margin="@dimen/text_margin"
tools:context=".ui.components.Stepper">
<!-- // TODO: Make these text views use the size and appearance of the material text input -->
<TextView
android:id="@+id/text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingHorizontal="4dp"
android:paddingTop="4dp"
android:paddingBottom="11dp"
android:textAppearance="@android:style/TextAppearance.Material.Medium"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintTop_toBottomOf="@id/label"
tools:text="20 (+5)" />
<TextView
@@ -21,15 +27,39 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=""
android:textAppearance="?attr/textAppearanceSubtitle1"
android:textAppearance="@android:style/TextAppearance.Material.Caption"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:text="Strength" />
<!--
<TextView
android:id="@+id/text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="@android:style/TextAppearance.Material.Body1"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:text="20 (+5)" />
<TextView
android:id="@+id/label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=""
android:textAppearance="@android:style/TextAppearance.Material.Caption"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:text="Strength" />
android:layout_marginTop="8dp"
-->
<Button
android:id="@+id/decrement"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingVertical="8dp"
android:text="@string/label_decrement_field"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@id/increment"
@@ -39,8 +69,9 @@
android:id="@+id/increment"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingVertical="8dp"
android:text="@string/label_increment_field"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</merge>
</merge>