Navigation Menu

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

May I know how I can set the animation to loop infinitely #7

Open
Meowzz95 opened this issue Dec 30, 2017 · 1 comment
Open

May I know how I can set the animation to loop infinitely #7

Meowzz95 opened this issue Dec 30, 2017 · 1 comment

Comments

@Meowzz95
Copy link

Hi anyone still maintaining this project? May I know how I can set the animation to loop infinitely? Thanks!

@GaspardIV
Copy link

[...]
        mLoadingView.addListener(new LoadingView.LoadingListener() {
            @Override
            public void onAnimationStart(int currentItemPosition) {
                mLoadingView.setVisibility(View.VISIBLE);
            }

            @Override
            public void onAnimationRepeat(int nextItemPosition) {
                mLoadingView.setRepeat(2);
            }

            @Override
            public void onAnimationEnd(int nextItemPosition) {
                mLoadingView.setVisibility(View.INVISIBLE);
            }
        });
[...]

private void startLoadingAnim() {
    mLoadingView.setRepeat(2);
    mLoadingView.startAnimation();
}

private void stopLoadingAnim() {
    mLoadingView.setRepeat(1);
}

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