Layout cleanup.

This commit is contained in:
2021-08-30 12:49:54 -07:00
parent 6a5b6492e3
commit bdfa1e9e86
20 changed files with 5 additions and 126 deletions

View File

@@ -9,6 +9,7 @@
<entry key="app/src/main/res/layout/fragment_edit_strings_list_item.xml" value="0.2210144927536232" />
<entry key="app/src/main/res/layout/fragment_edit_traits_list.xml" value="0.2210144927536232" />
<entry key="app/src/main/res/layout/fragment_edit_traits_list_item.xml" value="0.2210144927536232" />
<entry key="app/src/main/res/layout/fragment_search.xml" value="0.16875" />
<entry key="app/src/main/res/layout/simple_list_item.xml" value="0.2210144927536232" />
</map>
</option>

View File

@@ -37,7 +37,7 @@ public class LibraryRecyclerViewAdapter extends ListAdapter<Monster, LibraryRecy
@NonNull
public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
View view = LayoutInflater.from(parent.getContext())
.inflate(R.layout.monster_list_content, parent, false);
.inflate(R.layout.simple_list_item, parent, false);
return new ViewHolder(view);
}

View File

@@ -55,7 +55,7 @@ public class SearchResultsRecyclerViewAdapter extends RecyclerView.Adapter<Searc
@Override
public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
View view = LayoutInflater.from(parent.getContext())
.inflate(R.layout.monster_list_content, parent, false);
.inflate(R.layout.simple_list_item, parent, false);
return new ViewHolder(view);
}

View File

@@ -31,5 +31,4 @@
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.0"
app:navGraph="@navigation/mobile_navigation" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -55,5 +55,4 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:text="+5" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -35,6 +35,4 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/name"
tools:text="Melee Weapon Attack: +8 to hit, reach 10 ft., one target. Hit: 14 (2d8 + 5) bludgeoning damage." />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -31,5 +31,4 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:text="17" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -31,5 +31,4 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:text="1/8" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -31,5 +31,4 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:text="367" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -31,5 +31,4 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:text="+2" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -169,6 +169,4 @@
android:layout_marginHorizontal="@dimen/padding_small"
android:layout_weight="1" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -1,78 +0,0 @@
<?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="wrap_content"
android:layout_margin="@dimen/text_margin"
tools:context=".ui.components.AdvantagePicker">
<!-- // TODO: style this control to look less awful by default -->
<TextView
android:id="@+id/label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginHorizontal="@dimen/padding_normal"
android:layout_marginTop="@dimen/padding_small"
android:text="@string/label_advantage"
android:textAppearance="@android:style/TextAppearance.Material.Body1"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<RadioGroup
android:id="@+id/group"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@id/label">
<com.google.android.material.radiobutton.MaterialRadioButton
android:id="@+id/hasNoAdvantage"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginHorizontal="4dp"
android:layout_marginVertical="8dp"
android:layout_weight="1"
android:background="@drawable/radio_button_selector"
android:button="@android:color/transparent"
android:gravity="center"
android:padding="8dp"
android:text="@string/label_advantage_none"
android:textAppearance="@android:style/TextAppearance.Material.Button"
android:textColor="@color/radio_button_text"
tools:checked="true" />
<com.google.android.material.radiobutton.MaterialRadioButton
android:id="@+id/hasAdvantage"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginHorizontal="4dp"
android:layout_marginVertical="8dp"
android:layout_weight="1"
android:background="@drawable/radio_button_selector"
android:button="@android:color/transparent"
android:gravity="center"
android:padding="8dp"
android:text="@string/label_advantage_advantage"
android:textAppearance="@android:style/TextAppearance.Material.Button"
android:textColor="@color/radio_button_text"
tools:checked="false" />
<com.google.android.material.radiobutton.MaterialRadioButton
android:id="@+id/hasDisadvantage"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginHorizontal="4dp"
android:layout_marginVertical="8dp"
android:layout_weight="1"
android:background="@drawable/radio_button_selector"
android:button="@android:color/transparent"
android:gravity="center"
android:padding="8dp"
android:text="@string/label_advantage_disadvantage"
android:textAppearance="@android:style/TextAppearance.Material.Button"
android:textColor="@color/radio_button_text"
tools:checked="false" />
</RadioGroup>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -184,6 +184,5 @@
android:text="@string/label_regional_effects"
android:textSize="@dimen/text_h4_size"
app:drawableEndCompat="@drawable/ic_chevron_right_24" />
</LinearLayout>
</ScrollView>

View File

@@ -167,5 +167,4 @@
android:layout_height="wrap_content" />
</LinearLayout>
</LinearLayout>
</ScrollView>

View File

@@ -1,13 +0,0 @@
<?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="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/text_margin"
android:textAppearance="?attr/textAppearanceListItem" />
</LinearLayout>

View File

@@ -17,7 +17,7 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:context=".MonsterListFragment"
tools:listitem="@layout/monster_list_content" />
tools:listitem="@layout/simple_list_item" />
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/fab"

View File

@@ -34,7 +34,5 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/search_query"
tools:context=".SearchResultsFragment"
tools:listitem="@layout/monster_list_content" />
tools:listitem="@layout/simple_list_item" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -1,14 +0,0 @@
<?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">
<!-- // TODO: combine all of these similar list layouts into a single one -->
<TextView
android:id="@+id/content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/text_margin"
android:textAppearance="?attr/textAppearanceListItem" />
</LinearLayout>

View File

@@ -97,5 +97,4 @@
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -84,7 +84,5 @@
layout="@layout/card_challenge_rating"
android:layout_width="@dimen/icon_size"
android:layout_height="@dimen/icon_size" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>