Fixes lists to use similar sized items.

This commit is contained in:
Tom Hicks
2021-07-01 00:02:48 -07:00
parent 7c9037af84
commit b4767676d2
5 changed files with 26 additions and 13 deletions

View File

@@ -50,7 +50,7 @@ public class LibraryFragment extends MCFragment {
Context context = requireContext();
MonsterRepository repository = this.getMonsterRepository();
MonsterListRecyclerViewAdapter adapter = new MonsterListRecyclerViewAdapter(
LibraryRecyclerViewAdapter adapter = new LibraryRecyclerViewAdapter(
context,
repository.getMonsters(),
(monster) -> navigateToMonsterDetail(monster.id),

View File

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

View File

@@ -1,7 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
<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_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/text_margin"
android:textAppearance="?attr/textAppearanceListItem" />
</LinearLayout>

View File

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

View File

@@ -1,7 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
<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>