May I know how I can set the animation to loop infinitely
Opened this issue · 1 comments
Meowzz95 commented
Hi anyone still maintaining this project? May I know how I can set the animation to loop infinitely? Thanks!
GaspardIV commented
[...]
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);
}