本文整理了Java中android.webkit.WebView.setScrollBarStyle()
方法的一些代码示例,展示了WebView.setScrollBarStyle()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WebView.setScrollBarStyle()
方法的具体详情如下:
包路径:android.webkit.WebView
类名称:WebView
方法名:setScrollBarStyle
暂无
代码示例来源:origin: stackoverflow.com
webview.setScrollBarStyle(WebView.SCROLLBARS_OUTSIDE_OVERLAY);
代码示例来源:origin: stackoverflow.com
settings.setJavaScriptEnabled(true);
settings.setSupportZoom(false);
mWeb.setScrollBarStyle(View.SCROLLBARS_INSIDE_OVERLAY);
mWeb.getSettings().setBuiltInZoomControls(false);
mWeb.loadUrl("myurl...");
代码示例来源:origin: chentao0707/SimplifyReader
mWebView.setScrollBarStyle(View.SCROLLBARS_INSIDE_OVERLAY);
mWebView.getSettings().setDefaultTextEncodingName("UTF-8");
mWebView.getSettings().setCacheMode(WebSettings.LOAD_NO_CACHE);
代码示例来源:origin: ankidroid/Anki-Android
@SuppressLint("SetJavaScriptEnabled") // they request we review carefully because of XSS security, we have
private WebView createWebView() {
WebView webView = new MyWebView(this);
webView.setScrollBarStyle(View.SCROLLBARS_OUTSIDE_OVERLAY);
webView.getSettings().setDisplayZoomControls(false);
webView.getSettings().setBuiltInZoomControls(true);
代码示例来源:origin: sunfusheng/MarqueeView
webView.setHorizontalScrollBarEnabled(false);
webView.setScrollBarStyle(View.SCROLLBARS_INSIDE_OVERLAY); // 取消滚动条白边效果
webView.requestFocus();
代码示例来源:origin: cSploit/android
mWebView.setScrollBarStyle(View.SCROLLBARS_INSIDE_OVERLAY);
mProgressBar = (ProgressBar) findViewById(R.id.webprogress);
mURLet = (EditText) findViewById(R.id.url);
代码示例来源:origin: sunfusheng/StickyHeaderListView
webView.setHorizontalScrollBarEnabled(false);
webView.setScrollBarStyle(View.SCROLLBARS_INSIDE_OVERLAY); // 取消滚动条白边效果
webView.requestFocus();
代码示例来源:origin: stackoverflow.com
WebView webView = new WebView(this);
webView.setBackgroundColor(0xff000000);
webView.setScrollBarStyle(WebView.SCROLLBARS_OUTSIDE_OVERLAY);
webView.getSettings().setBuiltInZoomControls(true);
webView.getSettings().setSupportZoom(true);
//webView.getSettings().setDisplayZoomControls(false); // API 11
webView.loadDataWithBaseURL(null, getHtml(), "text/html", "UTF-8", null);
mainView.addView(webView, -1, -2);
代码示例来源:origin: stackoverflow.com
webview.setScrollBarStyle(WebView.SCROLLBARS_OUTSIDE_OVERLAY);
代码示例来源:origin: FolioReader/FolioReader-Android
wikiWebView.setWebViewClient(new WebViewClient());
wikiWebView.getSettings().setJavaScriptEnabled(true);
wikiWebView.setScrollBarStyle(View.SCROLLBARS_INSIDE_OVERLAY);
代码示例来源:origin: sunfusheng/GlideImageView
private void initWebViewSettings() {
WebSettings settings = webView.getSettings();
settings.setJavaScriptEnabled(true); // 默认false,设置true后我们才能在WebView里与我们的JS代码进行交互
settings.setJavaScriptCanOpenWindowsAutomatically(true); // 设置JS是否可以打开WebView新窗口
settings.setSupportZoom(true); // 支持缩放
settings.setBuiltInZoomControls(true); // 支持手势缩放
settings.setDisplayZoomControls(false); // 不显示缩放按钮
settings.setDatabaseEnabled(true);
settings.setSaveFormData(true);
settings.setDomStorageEnabled(true);
settings.setGeolocationEnabled(true);
settings.setAppCacheEnabled(true);
settings.setUseWideViewPort(true); // 将图片调整到适合WebView的大小
settings.setLoadWithOverviewMode(true); // 自适应屏幕
webView.setHorizontalScrollBarEnabled(false);
webView.setScrollbarFadingEnabled(true);
webView.setScrollBarStyle(View.SCROLLBARS_OUTSIDE_OVERLAY);
webView.setOverScrollMode(View.OVER_SCROLL_NEVER); // 取消WebView中滚动或拖动到顶部、底部时的阴影
}
代码示例来源:origin: stackoverflow.com
WebView webView= (WebView) findViewById(R.id.webView1);
webView.setWebViewClient(new MyBrowser());
webView.getSettings().setLoadsImagesAutomatically(true);
webView.getSettings().setJavaScriptEnabled(true);
webView.setScrollBarStyle(View.SCROLLBARS_INSIDE_OVERLAY);
webView.loadUrl("http://electricity.com.om/newbilltemplate/");
代码示例来源:origin: stackoverflow.com
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
WebView mainWebView = (WebView) findViewById(R.id.webView1);
WebSettings webSettings = mainWebView.getSettings();
webSettings.setJavaScriptEnabled(true);
mainWebView.setWebViewClient(new MyCustomWebViewClient());
mainWebView.setScrollBarStyle(View.SCROLLBARS_INSIDE_OVERLAY);
mainWebView.loadUrl("file:///android_asset/www/A.html");
}
代码示例来源:origin: stackoverflow.com
WebView webView;
String webViewUrl = "http://www.google.com";
webView.getSettings().setJavaScriptEnabled(true);
webView.getSettings().setLoadWithOverviewMode(true);
webView.setScrollBarStyle(WebView.SCROLLBARS_OUTSIDE_OVERLAY);
webView.setScrollbarFadingEnabled(false);
webView.getSettings().setBuiltInZoomControls(true);
webView.getSettings().setPluginState(PluginState.ON);
webView.getSettings().setSupportZoom(true);
webView.loadUrl(webViewUrl);
代码示例来源:origin: stackoverflow.com
WebView webview =(WebView)findViewById(R.id.webview);
webview.setWebViewClient(new WebViewClient());
webview .getSettings().setJavaScriptEnabled(true);
webview.setScrollBarStyle(View.SCROLLBARS_INSIDE_OVERLAY);
webview .getSettings().setDomStorageEnabled(true);
webview.loadUrl("URL");
代码示例来源:origin: stackoverflow.com
WebView webView = (WebView)findViewById(R.id.web_view);
webView.setInitialScale((int) /*getActivity(). if you are at Fragment*/getResources().getDimension(R.dimen._50sdp));
webView.getSettings().setLoadsImagesAutomatically(true);
webView.getSettings().setJavaScriptEnabled(true);
webView.setScrollBarStyle(View.SCROLLBARS_INSIDE_OVERLAY);
webView.loadDataWithBaseURL(null,here comes html content,"text/html","UTF-8", null);
webView.getSettings().setBuiltInZoomControls(true);
webView.getSettings().setSupportZoom(true);
webView.getSettings().setDisplayZoomControls(true);
webView.getSettings().setDefaultZoom(WebSettings.ZoomDensity.FAR);
代码示例来源:origin: stackoverflow.com
WebView web;
web = (WebView) findViewById(R.id.webkit);
web.setWebViewClient(new Callback());
web.getSettings().setJavaScriptEnabled(true);
web.getSettings().setLoadWithOverviewMode(true);
web.getSettings().setUseWideViewPort(true);
web.setScrollBarStyle(WebView.SCROLLBARS_OUTSIDE_OVERLAY);
web.setScrollbarFadingEnabled(false);
代码示例来源:origin: stackoverflow.com
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setTitle(getTitleResourceId());
setActionBarContentView(R.layout.info_template);
WebView engine = (WebView) findViewById(R.id.web_view);
engine.setBackgroundColor(0);
engine.setBackgroundResource(R.drawable.bg);
engine.setScrollBarStyle(View.SCROLLBARS_INSIDE_OVERLAY);
engine.getSettings().setBuiltInZoomControls(true);
engine.loadUrl(getUrlToLoad());
engine.setWebViewClient(new WebViewWithin());
}
代码示例来源:origin: stackoverflow.com
WebView mWebView = (WebView) findViewById(R.id.webView1);
mWebView.setScrollBarStyle(WebView.SCROLLBARS_OUTSIDE_OVERLAY);
mWebView.setBackgroundColor(Color.parseColor("#ffffff"));
mWebView.loadUrl("file:///android_asset/image.png");
mWebView.getSettings().setBuiltInZoomControls(true);
mWebView.setInitialScale(50);
代码示例来源:origin: happyheng/Sport_Android
private void initWebView() {
WebSettings settings = mWebView.getSettings();
settings.setLayoutAlgorithm(WebSettings.LayoutAlgorithm.SINGLE_COLUMN);
settings.setUseWideViewPort(true);
settings.setLoadWithOverviewMode(true);
mWebView.setScrollBarStyle(View.SCROLLBARS_OUTSIDE_OVERLAY);
}
}
内容来源于网络,如有侵权,请联系作者删除!