Bug 1394404 - Part 1: Update AnimatedProgressBar's progress value to 100 before hiding it. r?walkingice
Our new animated progress bar follows the logic to hide itself:
1. When its progress value reaches 100, it disappears gracefully(with animation), otherwise,
2. It just disappears directly.
To make sure the progress bar always looked like fully loaded, we have to set its progress value to 100 before hiding it.
MozReview-Commit-ID: JSYEPYEhG4A
--- a/mobile/android/base/java/org/mozilla/gecko/customtabs/CustomTabsActivity.java
+++ b/mobile/android/base/java/org/mozilla/gecko/customtabs/CustomTabsActivity.java
@@ -404,19 +404,19 @@ public class CustomTabsActivity extends
forwardMenuItem.setEnabled(mCanGoForward);
}
/**
* Update the state of the progress bar.
* @param progress The current loading progress; must be between 0 and 100
*/
private void updateProgress(final int progress) {
+ mProgressView.setProgress(progress);
if (mCanStop) {
mProgressView.setVisibility(View.VISIBLE);
- mProgressView.setProgress(progress);
} else {
mProgressView.setVisibility(View.GONE);
}
}
/**
* Update loading status of current page
*/