Scroll RecyclerView as scrolling a deck of cards. This library offers a custom LayoutManager to achieve it.
dependencies {
implementation "com.github.lekaha:carddecklayoutmanager:1.0.0"
}
val recycler = findViewById<RecyclerView>(R.id.recycler)
// revealHeight = that interval space between cards
recycler.layoutManager = CardDeckLayoutManager(this, recycler, revealHeight)
If you would like to make your items in the list are more like card
you can find this Drawable resource file
And add it as your item layout background.
For instance,
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/bg_card"> <-- here
</androidx.constraintlayout.widget.ConstraintLayout>
- Not yet have recycling mechanism
See the LICENSE file for license rights and limitations (Apache license 2.0).