android.webkit.WebView.setHorizontalScrollBarEnabled()方法的使用及代码示例

x33g5p2x  于2022-02-02 转载在 其他  
字(7.4k)|赞(0)|评价(0)|浏览(212)

本文整理了Java中android.webkit.WebView.setHorizontalScrollBarEnabled()方法的一些代码示例,展示了WebView.setHorizontalScrollBarEnabled()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WebView.setHorizontalScrollBarEnabled()方法的具体详情如下:
包路径:android.webkit.WebView
类名称:WebView
方法名:setHorizontalScrollBarEnabled

WebView.setHorizontalScrollBarEnabled介绍

暂无

代码示例

代码示例来源:origin: facebook/facebook-android-sdk

webView.setHorizontalScrollBarEnabled(false);
webView.setWebViewClient(new DialogWebViewClient());
webView.getSettings().setJavaScriptEnabled(true);

代码示例来源:origin: stackoverflow.com

mWebView.setHorizontalScrollBarEnabled(false);
mWebView.setWebViewClient(new Twitter_Dialog.DialogWebViewClient());
mWebView.getSettings().setJavaScriptEnabled(true);

代码示例来源:origin: stackoverflow.com

mWebviewPop = new WebView(mContext);
mWebviewPop.setVerticalScrollBarEnabled(false);
mWebviewPop.setHorizontalScrollBarEnabled(false);
mWebviewPop.setWebViewClient(new UriWebViewClient());
mWebviewPop.getSettings().setJavaScriptEnabled(true);

代码示例来源:origin: wangdan/AisenWeiBo

large.setHorizontalScrollBarEnabled(false);

代码示例来源:origin: wangdan/AisenWeiBo

webview.setHorizontalScrollBarEnabled(false);

代码示例来源:origin: sunfusheng/MarqueeView

webView.setHorizontalScrollBarEnabled(false);

代码示例来源:origin: sunfusheng/StickyHeaderListView

webView.setHorizontalScrollBarEnabled(false);

代码示例来源: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

public void OpenUrl() {         

  private WebView View;
  View = (WebView) WebDialog.findViewById(R.id.ticketline);  
  View.setWebViewClient(new WebConn());
  View.setScrollbarFadingEnabled(true);  
  View.setHorizontalScrollBarEnabled(false);  
  View.getSettings().setJavaScriptEnabled(true);
  View.loadUrl("url to be loaded goes here");

  getActivity().getSupportFragmentManager().beginTransaction().remove(this).commit();
  WebDialog.show();
}

代码示例来源:origin: stackoverflow.com

...
private void disableHorizontalScrolling() {
  WebView view = (WebView)appView.getEngine().getView();
  view.setHorizontalScrollBarEnabled(false);
  view.getSettings().setLayoutAlgorithm(LayoutAlgorithm.NORMAL);
  view.setOverScrollMode(View.OVER_SCROLL_NEVER);
}

代码示例来源:origin: stackoverflow.com

WebView mWebView = new WebView(context);
   mWebView.setWebViewClient(new WebClicent());
   mWebView.setScrollbarFadingEnabled(false);
   mWebView.setHorizontalScrollBarEnabled(true);
   mWebView.setWebViewClient(new MyWebViewClient());
   mWebView.getSettings().setUseWideViewPort(true);

代码示例来源:origin: stackoverflow.com

WebView wv= (WebView) findViewById(R.id.wv);
wv.setVerticalScrollBarEnabled(true);
wv.setHorizontalScrollBarEnabled(true);
wv.getSettings().setBuiltInZoomControls(true);
wv.getSettings().setJavaScriptEnabled(true);
wv.setWebViewClient(new WebViewClient());
wv.loadUrl("https://docs.google.com/file/d/0B8ZDVNCvRWK8c3YzQVFaWjg1bEU/edit")//pdf uploaded to google docs. Some cases requires users to login and requires permission of the owner of the doc.

代码示例来源:origin: stackoverflow.com

WebView wv= (WebView) findViewById(R.id.wv);
  wv.setVerticalScrollBarEnabled(true);
  wv.setHorizontalScrollBarEnabled(true);
  wv.getSettings().setBuiltInZoomControls(true);
  wv.getSettings().setJavaScriptEnabled(true);
  wv.setWebViewClient(new WebViewClient());
  wv.loadUrl("https://docs.google.com/file/d/0B8ZDVNCvRWK8c3YzQVFaWjg1bEU/edit");

代码示例来源:origin: stackoverflow.com

final WebView myWebView = (WebView) findViewById(R.id.webview);
myWebView.setVerticalScrollBarEnabled(false);
myWebView.setHorizontalScrollBarEnabled(false);
WebSettings webSettings = myWebView.getSettings();
webSettings.setJavaScriptEnabled(true);
webSettings.setJavaScriptCanOpenWindowsAutomatically(true);

代码示例来源:origin: ckcz123/PKUHelper-Android

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
             Bundle savedInstanceState) {
  View rootView = inflater.inflate(R.layout.classroom_fragement,
      container, false);
  webView = (WebView) rootView.findViewById(R.id.classroom_view);
  webView.setVerticalScrollBarEnabled(false);
  webView.setHorizontalScrollBarEnabled(false);
  showView(getArguments().getInt("index"));
  return rootView;
}

代码示例来源:origin: mukeshsolanki/social-login-helper-Deprecated-

/**
 * Creating webview for instagram dialog login
 */
private void setUpWebView() {
 mWebView = new WebView(getContext());
 mWebView.setVerticalScrollBarEnabled(false);
 mWebView.setHorizontalScrollBarEnabled(false);
 mWebView.setWebViewClient(new OAuthWebViewClient());
 mWebView.getSettings().setJavaScriptEnabled(true);
 mWebView.loadUrl(mUrl);
 mWebView.setLayoutParams(FILL);
 mContent.addView(mWebView);
}

代码示例来源:origin: stackoverflow.com

String LocalFile = "file:///android_asset/YOUR_HTML_FILE.htm";
 WebView webView = (WebView) findViewById(R.id.YOUR_WEB_VIEW);
 WebSettings webSettings = webView.getSettings();
 webSettings.setJavaScriptEnabled(true);
 webSettings.setPluginsEnabled(true);
 webSettings.setLoadWithOverviewMode(true);
 webSettings.setUseWideViewPort(true); 
 webSettings.setAllowFileAccess(true);
 webView.setBackgroundColor(Color.BLACK);
 webView.setVerticalScrollBarEnabled(false);
 webView.setHorizontalScrollBarEnabled(false);
 webView.loadUrl(LocalFile);

代码示例来源:origin: geniusgithub/Look-Around

private void onUIReady(View view){
  ButterKnife.bind(this, view);
  mWebView.setVerticalScrollBarEnabled(false);
  mWebView.setHorizontalScrollBarEnabled(false);
  mWebView.requestFocus();
  WebSettings webSettings = mWebView.getSettings();
  webSettings.setJavaScriptEnabled(true);
  webSettings.setBuiltInZoomControls(true);
  webSettings.setSupportZoom(true);
  webSettings.setCacheMode(WebSettings.LOAD_NO_CACHE);
  initData(getParentActivity().getIntent());
}

代码示例来源:origin: ckcz123/PKUHelper-Android

@SuppressWarnings("unchecked")
public Shows getHtml(String title, String url) {
  subActivity.setContentView(R.layout.subactivity_webview);
  subActivity.getActionBar().setTitle(title);
  subActivity.webView =
      (WebView) subActivity.findViewById(R.id.subactivity_webview);
  subActivity.webView.setVerticalScrollBarEnabled(false);
  subActivity.webView.setHorizontalScrollBarEnabled(false);
  new RequestingTask(subActivity, "正在获取详细信息...", url
      , Constants.REQUEST_SUBACTIVITY_SHOWS_DETAIL)
      .execute(new ArrayList<Parameters>());
  return this;
}

代码示例来源:origin: andforce/iBeebo

public void initView() {
  mWebView = (WebView) findViewById(R.id.webview);
  mInjectJS = new InjectJS(mWebView);
  mWebView.setVerticalScrollBarEnabled(false);
  mWebView.setHorizontalScrollBarEnabled(false);
  mWebView.requestFocus();
  WebSettings webSettings = mWebView.getSettings();
  webSettings.setJavaScriptEnabled(true);
  webSettings.setBuiltInZoomControls(true);
  webSettings.setSaveFormData(true);
  webSettings.setSupportZoom(true);
  webSettings.setCacheMode(WebSettings.LOAD_NO_CACHE);
  progressBar = findViewById(R.id.show_request_progress_bar);
}

相关文章

WebView类方法