This repository was archived by the owner on Mar 26, 2019. It is now read-only.
Description I just try version 3.0.2 when I scroll down to the bottom I found an empty space like this
I also add items at the start to show that empty space is still at the bottom
What I want to ask is, is this normal or I just did something wrong?
Setup layout
val layoutManager = SpannedGridLayoutManager(SpannedGridLayoutManager.Orientation.VERTICAL, 4)
layoutManager.spanSizeLookup = SpannedGridLayoutManager.SpanSizeLookup { position ->
when (position) {
0 -> SpanSize(4, 2)
1, 2 -> SpanSize(2, 2)
else -> SpanSize(1, 1)
}
}
layoutManager.itemOrderIsStable = true
MainActivity's layout
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
<android.support.v7.widget.RecyclerView
android:id="@+id/recycler_view"
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toBottomOf="parent"/>
</android.support.constraint.ConstraintLayout>
Item's layout
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.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"
xmlns:tools="http://schemas.android.com/tools">
<android.support.constraint.ConstraintLayout
android:id="@+id/item_layout_bg"
android:layout_width="match_parent"
android:layout_height="0dp"
app:layout_constraintDimensionRatio="H,1:1">
<TextView
android:id="@+id/item_layout_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:text="TEST"/>
</android.support.constraint.ConstraintLayout>
</android.support.constraint.ConstraintLayout>
Reactions are currently unavailable
I just try version 3.0.2 when I scroll down to the bottom I found an empty space like this
I also add items at the start to show that empty space is still at the bottom
What I want to ask is, is this normal or I just did something wrong?
Setup layout
MainActivity's layout
Item's layout