CardStackView
CardStackView copied to clipboard
itemView translate when call notifyItemChanged on bottom visible card.
- cardStackView config:
manager.setStackFrom(StackFrom.Bottom)
manager.setVisibleCount(3)
manager.setTranslationInterval(8.0f)
manager.setScaleInterval(0.95f)
manager.setSwipeThresholdRatio(0.19f)
manager.setDirections(Direction.HORIZONTAL)
manager.setCanScrollHorizontal(true)
manager.setCanScrollVertical(true)
manager.setSwipeableMethod(SwipeableMethod.AutomaticAndManual)
manager.setOverlayInterpolator(LinearInterpolator())
cardStackView.layoutManager = manager
cardStackView.adapter = adapter
cardStackView.itemAnimator.apply {
if (this is DefaultItemAnimator) {
supportsChangeAnimations = false
}
}
-
it looks fine at the initialization as the screenshot below:
-
but when i invoke
adapter.notifyItemChanged(manager.topPosition + 2)
to change the bottom card. the bottom card did a translation and disappeared at the end:
@yueban Thank you for your report! I can reproduce this issue on my device. I will fix it when I have a time.
@yuyakaido I am having this exact issue. Is there an update on this, please?
I am trying to load text onto cards from the internet. I put "Loading" on the card initially and when the HTTP call is done, I update the card. However, whenever I do (when I call the notifyItamChanged() method on the adapter), the card at the back jumps in front for a split second.
Any progress on it?
Any progress on it?