зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1437988 - [2.0] Use progress tracking events for custom tabs progress bar. r=droeh
This commit is contained in:
Родитель
28404bd49d
Коммит
af49add1ed
|
@ -114,7 +114,6 @@ public class CustomTabsActivity extends AppCompatActivity
|
|||
doorhangerOverlay = findViewById(R.id.custom_tabs_doorhanger_overlay);
|
||||
|
||||
mProgressView = (ProgressBar) findViewById(R.id.page_progress);
|
||||
updateProgress(10);
|
||||
final Toolbar toolbar = (Toolbar) findViewById(R.id.actionbar);
|
||||
setSupportActionBar(toolbar);
|
||||
final ActionBar actionBar = getSupportActionBar();
|
||||
|
@ -596,7 +595,6 @@ public class CustomTabsActivity extends AppCompatActivity
|
|||
public void onLocationChange(GeckoSession session, String url) {
|
||||
mCurrentUrl = url;
|
||||
updateActionBar();
|
||||
updateProgress(60);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -663,18 +661,21 @@ public class CustomTabsActivity extends AppCompatActivity
|
|||
mCanStop = true;
|
||||
updateActionBar();
|
||||
updateCanStop();
|
||||
updateProgress(20);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPageStop(GeckoSession session, boolean success) {
|
||||
mCanStop = false;
|
||||
updateCanStop();
|
||||
updateProgress(100);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onProgressChange(GeckoSession session, int progress) {
|
||||
if (progress == 100) {
|
||||
mCanStop = false;
|
||||
updateCanStop();
|
||||
}
|
||||
updateProgress(progress);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Загрузка…
Ссылка в новой задаче