CardStackView icon indicating copy to clipboard operation
CardStackView copied to clipboard

itemView translate when call notifyItemChanged on bottom visible card.

Open yueban opened this issue 5 years ago • 4 comments

  1. 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
    }
}
  1. it looks fine at the initialization as the screenshot below: image

  2. 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: image

yueban avatar May 20 '19 09:05 yueban

@yueban Thank you for your report! I can reproduce this issue on my device. I will fix it when I have a time.

yuyakaido avatar Jun 07 '19 14:06 yuyakaido

@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.

mt-akar avatar Oct 09 '20 14:10 mt-akar

Any progress on it?

P1NG2WIN avatar Sep 02 '21 12:09 P1NG2WIN

Any progress on it?

BzCoder avatar Jun 14 '23 07:06 BzCoder