Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slugness while scrolling #11

Open
shaz-tech opened this issue Sep 11, 2018 · 1 comment
Open

Slugness while scrolling #11

shaz-tech opened this issue Sep 11, 2018 · 1 comment

Comments

@shaz-tech
Copy link

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

@timtsj
Copy link

timtsj commented Oct 20, 2021

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;
            }
        });
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants