#3756 Convert SearchDepictionsFragment to use Pagination (#3758)

This commit is contained in:
Seán Mac Gillicuddy 2020-05-28 12:10:04 +01:00 committed by GitHub
parent 0ebd59a223
commit c216fdf0d4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
33 changed files with 1035 additions and 616 deletions

View file

@ -0,0 +1,29 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingTop="@dimen/tiny_gap"
android:orientation="vertical">
<TextView
android:id="@+id/depictionNotFound"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:gravity="center"
android:visibility="gone" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/depictionsSearchResultsList"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scrollbarSize="@dimen/standard_gap"
android:scrollbars="vertical" />
<ProgressBar
android:id="@+id/depictionSearchInitialLoadProgress"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"/>
</RelativeLayout>

View file

@ -1,37 +1,43 @@
<?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"
android:orientation="vertical" android:layout_width="match_parent"
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:padding="@dimen/tiny_gap">
<TextView
android:id="@+id/depicts_label"
android:textStyle="bold"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:padding="@dimen/tiny_gap">
android:paddingTop="@dimen/tiny_gap"
android:text="Label"
android:textAppearance="?android:attr/textAppearanceMedium"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/depicts_image"
app:layout_constraintTop_toTopOf="parent"
tools:text="Really really really really long long long label" />
<com.facebook.drawee.view.SimpleDraweeView
android:id="@+id/depicts_image"
android:layout_width="70dp"
android:layout_height="70dp"
android:paddingRight="@dimen/tiny_gap"
app:placeholderImage="@drawable/ic_wikidata_logo_24dp"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent"/>
<TextView
android:id="@+id/description"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:paddingTop="@dimen/tiny_gap"
android:text="Description"
tools:text="Really really really really long long long description description description"
app:layout_constraintStart_toEndOf="@+id/depicts_image"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/depicts_label" />
<TextView
android:id="@+id/depicts_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Label"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textStyle="bold"
android:paddingTop="@dimen/tiny_gap"
app:layout_constraintLeft_toRightOf="@+id/depicts_image"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/description"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Description"
android:paddingTop="@dimen/tiny_gap"
app:layout_constraintLeft_toRightOf="@+id/depicts_image"
app:layout_constraintTop_toBottomOf="@+id/depicts_label" />
<com.facebook.drawee.view.SimpleDraweeView
android:id="@+id/depicts_image"
android:layout_width="70dp"
android:layout_height="70dp"
android:paddingRight="@dimen/tiny_gap"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:placeholderImage="@drawable/ic_wikidata_logo_24dp" />
</androidx.constraintlayout.widget.ConstraintLayout>

View file

@ -0,0 +1,17 @@
<?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"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="@dimen/small_gap">
<Button
android:id="@+id/listItemLoadMoreButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/load_more"
android:textColor="@color/white"
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

@ -0,0 +1,13 @@
<?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"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ProgressBar
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>