use of org.kiwix.kiwixmobile.views.web.ToolbarStaticKiwixWebView in project kiwix-android by kiwix.
the class KiwixMobileActivity method getWebView.
private KiwixWebView getWebView(String url) {
AttributeSet attrs = StyleUtils.getAttributes(this, R.xml.webview);
KiwixWebView webView;
if (!isHideToolbar) {
webView = new ToolbarScrollingKiwixWebView(KiwixMobileActivity.this, this, toolbarContainer, pageBottomTabLayout, attrs);
((ToolbarScrollingKiwixWebView) webView).setOnToolbarVisibilityChangeListener(new ToolbarScrollingKiwixWebView.OnToolbarVisibilityChangeListener() {
@Override
public void onToolbarDisplayed() {
shrinkDrawers();
}
@Override
public void onToolbarHidden() {
expandDrawers();
}
});
} else {
webView = new ToolbarStaticKiwixWebView(KiwixMobileActivity.this, this, toolbarContainer, attrs);
}
webView.loadUrl(url);
webView.loadPrefs();
return webView;
}
Aggregations