yuyakaido / CardStackView

📱Tinder like swipeable card view for Android
Apache License 2.0
2.37k stars 448 forks source link

itemView translate when call notifyItemChanged on bottom visible card. #255

Open yueban opened 5 years ago

yueban commented 5 years ago
  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
    }
    }
  2. it looks fine at the initialization as the screenshot below: image

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

yuyakaido commented 5 years ago

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

mt-akar commented 3 years ago

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

P1NG2WIN commented 3 years ago

Any progress on it?

BzCoder commented 1 year ago

Any progress on it?