StackLayoutManager icon indicating copy to clipboard operation
StackLayoutManager copied to clipboard

Slugness while scrolling

Open shaz-tech opened this issue 7 years ago • 1 comments

Cards are overlapping and getting stuck over others while scrolling and release in the middle of the screen and sometimes in fast scroll.

shaz-tech avatar Sep 11 '18 07:09 shaz-tech

replace brewAndStartAnimator like this:

private void brewAndStartAnimator(int dur, int finalXorY) {
        if (animator != null && animator.isRunning())
            animator.cancel();
        animator = ObjectAnimator.ofInt(StackLayoutManager.this, "animateValue", 0, finalXorY);
        animator.setDuration(dur);
        animator.start();
        animator.addListener(new AnimatorListenerAdapter() {
            @Override
            public void onAnimationEnd(Animator animation) {
                lastAnimateValue = 0;
            }

            @Override
            public void onAnimationCancel(Animator animation) {
                lastAnimateValue = 0;
            }
        });
    }

timtsj avatar Oct 20 '21 09:10 timtsj