SaeedMasoumi/FAB-Loading

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

Opened this issue · 1 comments

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

[...]
        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);
}