Android: Move game list over to RecyclerView

This commit is contained in:
Connor McLaughlin
2021-03-06 14:42:40 +10:00
parent 5bd39bc2c7
commit 7b45df0cc2
6 changed files with 204 additions and 165 deletions

View File

@ -5,7 +5,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent">
<ListView
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/game_list_view"
android:layout_width="match_parent"
android:layout_height="match_parent"

View File

@ -4,14 +4,17 @@
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/linearLayout"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="wrap_content"
android:paddingTop="8dp"
android:paddingBottom="8dp"
android:background="?android:attr/selectableItemBackground">
<ImageView
android:id="@+id/game_list_view_entry_type_icon"
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:foregroundGravity="center_vertical"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:srcCompat="@drawable/ic_media_cdrom" />
@ -21,7 +24,6 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginTop="8dp"
android:layout_marginRight="80dp"
android:focusable="false"
android:focusableInTouchMode="false"
@ -50,7 +52,6 @@
android:id="@+id/game_list_view_compatibility_icon"
android:layout_width="64dp"
android:layout_height="16dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:focusable="false"
android:focusableInTouchMode="false"