use of org.mozilla.focus.tabs.TabViewClient in project Rocket by mozilla-tw.
the class InfoFragment method createTabViewClient.
@Override
public TabViewClient createTabViewClient() {
return new TabViewClient() {
@Override
public void onPageStarted(final String url) {
progressView.announceForAccessibility(getString(R.string.accessibility_announcement_loading));
progressView.setVisibility(View.VISIBLE);
}
@Override
public void onPageFinished(boolean isSecure) {
progressView.announceForAccessibility(getString(R.string.accessibility_announcement_loading_finished));
progressView.setVisibility(View.INVISIBLE);
if (webView.getVisibility() != View.VISIBLE) {
webView.setVisibility(View.VISIBLE);
}
}
@Override
public boolean handleExternalUrl(final String url) {
final TabView tabView = getTabView();
return tabView != null && IntentUtils.handleExternalUri(getContext(), tabView, url);
}
};
}
Aggregations