yuyakaido / CardStackView

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

[MAJOR BUG] Cannot add new items after cleared the existing list #252

Closed DeveloperKurt closed 5 years ago

DeveloperKurt commented 5 years ago

If you clear the list that you've attached to the custom adapter and then add new items to it regardless of calling cardAdapter.notifyDataSetChanged(); the displayed list of items-cards are not getting displayed even though the adapter's list is successfully getting updated.

LOGS: onSwiped: user swiped all of the retrieved cards, adding new cards addTestCards: adapter cardlist size : 0 (these are outputs of the count of the items in adapter ( cardAdapter.getItemCount()) addTestCards: adapter cardlist size : 1 addTestCards: adapter cardlist size : 2

DeveloperKurt commented 5 years ago

The bug doesn't seem to be appearing in current version: 2.3.2 The version it appeared: 2.0.0

PMARZV commented 1 year ago

Its happening the same with me. When adding new items throught diff util, if the cardview doesnt have any elements when new elements loaded the first Card ONCARDAPPEARED is not called and the data inside the function is the previous card data, then when swiped the next elements are triggering the oncardappearef funtion. Any help??