HarlonWang / HarlonWang/AVLoadingIndicatorView

I can't hide the Loading indicator View

Open
#131 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
9.7k
Forks
1.9k
PR merge metrics
No merged PRs in 30d

Description

Sometimes It does not hide when moving to the next fragment.

```
if (email.isEmpty()) {

showProgress(); // I defined this function using AVLoadingIndicatorView in BaseActivity

auth.signInWithEmailAndPassword(email, password)
.addOnCompleteListener(getActivity(), task -> {

hideProgress(); // hide the AVLoadingIndicatorView

if (task.isSuccessful()) {
// Sign in success, update UI with the signed-in user's information
moveToSubjectSelectFragment();
} else {
Log.w(TAG, "createUserWithEmail:failure", task.getException());
Toast.makeText(getActivity(), "Login fail", Toast.LENGTH_SHORT).show();
}

});
}
```

Here is the showProgress(), HideProgress() function in BaseActivity

```
public void showProgress() {
runOnUiThread(new Runnable() {
@Override
public void run() {
if(activityIndicator != null) activityIndicator.show();
}
});
}

public void HideProgress() {
runOnUiThread(new Runnable() {
@Override
public void run() {
if(activityIndicator != null) activityIndicator.hide();
}
});
}

```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.