Hi,
I've noticed one GUI glitch when I swipe away the item in the ListView just before the 'Undo' pop-up shows up on the screen.
This is the scenario when I have 3 items for example:
- I swipe away 2nd one
- Animation that moves 3rd one in a place for 2nd one finishes
problematic 3) 2nd item reappears in the ListView for a second before my Adapter data gets updated and is ready to show just 2 items without the deleted one.
So, the swiped item is shown briefly during the delay of ListView update. I've looked into the code and saw that this block of code does that:
#613 ViewGroup.LayoutParams lp;
#614 for (PendingDismissData pendingDismiss : mPendingDismisses) {
#615 // Reset view presentation
#616 setAlpha(pendingDismiss.view, 1f);
#617 setTranslationX(pendingDismiss.view, 0);
#618 lp = pendingDismiss.view.getLayoutParams();
#619 lp.height = originalHeight;
#620 pendingDismiss.view.setLayoutParams(lp);
#621 }
#623 mPendingDismisses.clear();
Why are you re-showing the dismissed item?
When I tried to remove this block of code, the behaviour is weird, sometimes two items got dismissed etc.
Can you please take a look at this?
Thanks,
Milos
Hi,
I've noticed one GUI glitch when I swipe away the item in the ListView just before the 'Undo' pop-up shows up on the screen.
This is the scenario when I have 3 items for example:
problematic 3) 2nd item reappears in the ListView for a second before my Adapter data gets updated and is ready to show just 2 items without the deleted one.
So, the swiped item is shown briefly during the delay of ListView update. I've looked into the code and saw that this block of code does that:
#613 ViewGroup.LayoutParams lp;
#614 for (PendingDismissData pendingDismiss : mPendingDismisses) {
#615 // Reset view presentation
#616 setAlpha(pendingDismiss.view, 1f);
#617 setTranslationX(pendingDismiss.view, 0);
#618 lp = pendingDismiss.view.getLayoutParams();
#619 lp.height = originalHeight;
#620 pendingDismiss.view.setLayoutParams(lp);
#621 }
#623 mPendingDismisses.clear();
Why are you re-showing the dismissed item?
When I tried to remove this block of code, the behaviour is weird, sometimes two items got dismissed etc.
Can you please take a look at this?
Thanks,
Milos