Create a CardStack UI similar to the iOS version in Kotlin
Create a CardStack UI that just used simple component Recyclerview
,ItemDecoration
val isCollapsedItem = if (itemCount > 0) {
getItem(0).collapsed
} else {
false
}
val collapsed = -300
when (itemPosition) {
0 -> {
if (isCollapsedItem) {
outRect.bottom = 600
} else {
outRect.bottom = 0
}
outRect.top = 0
}
else -> {
outRect.top = collapsed
outRect.bottom = 0
}
}
itemAnimator = DefaultItemAnimator().apply {
moveDuration = 300
}