Search in sources :

Example 1 with TabViewClient

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);
        }
    };
}
Also used : TabView(org.mozilla.focus.tabs.TabView) TabViewClient(org.mozilla.focus.tabs.TabViewClient)

Aggregations

TabView (org.mozilla.focus.tabs.TabView)1 TabViewClient (org.mozilla.focus.tabs.TabViewClient)1