replace GridView in library and search fragment with RecyclerView

closes #8
This commit is contained in:
2020-10-15 13:00:44 +02:00
parent 36c8678646
commit adf8a48251
8 changed files with 94 additions and 73 deletions

View File

@ -7,16 +7,15 @@
android:background="#f5f5f5"
tools:context=".ui.library.LibraryFragment">
<GridView
android:id="@+id/grid_media_library"
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recycler_media_library"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clipToPadding="false"
android:horizontalSpacing="7dp"
android:numColumns="2"
android:padding="5dp"
android:verticalSpacing="7dp"
tools:layout_editor_absoluteX="5dp"
tools:layout_editor_absoluteY="5dp" />
android:padding="3dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -20,16 +20,17 @@
</SearchView>
<GridView
android:id="@+id/grid_media_search"
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recycler_media_search"
android:layout_width="match_parent"
android:layout_height="0dp"
android:clipToPadding="false"
android:horizontalSpacing="7dp"
android:numColumns="2"
android:padding="5dp"
android:verticalSpacing="7dp"
android:padding="3dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@+id/search_text" />
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/search_text">
</androidx.recyclerview.widget.RecyclerView>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -3,7 +3,8 @@
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"
android:layout_height="wrap_content"
android:backgroundTint="#FFFFFF"
app:cardCornerRadius="7dp"
app:cardElevation="4dp">
@ -18,7 +19,7 @@
android:layout_height="112.5dp"
android:contentDescription="@string/media_poster_desc"
android:maxWidth="200dp"
android:scaleType="fitXY"
android:scaleType="centerCrop"
app:srcCompat="@color/md_disabled_text_dark_theme" />
<TextView