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

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

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

WebView.addView介绍

暂无

代码示例

代码示例来源:origin: lipangit/JiaoZiVideoPlayer

layoutParams.height = JZUtils.dip2px(ActivityWebView.this, height);
  layoutParams.width = JZUtils.dip2px(ActivityWebView.this, width);
  mWebView.addView(webVieo, layoutParams);
} else {
  JzvdStd webVieo = new JzvdStd(ActivityWebView.this);
  layoutParams.height = JZUtils.dip2px(ActivityWebView.this, height);
  layoutParams.width = JZUtils.dip2px(ActivityWebView.this, width);
  mWebView.addView(webVieo, layoutParams);

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

WebView webView = (WebView) findViewById(R.id.my_webview);
webView.setWebViewClient(new MyWebViewClient());
webView.addView(webView.getZoomControls());
webView.getSettings().setJavaScriptEnabled(true);
webView.loadUrl("http://docs.google.com/gview?embedded=true&url=http://myurl.com/demo.pdf");

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

WebView webView = (WebView) findViewById(R.id.my_webview);
webView.setWebViewClient(new MyWebViewClient());
webView.addView(webView.getZoomControls());
webView.getSettings().setJavaScriptEnabled(true);
webView.loadUrl("http://docs.google.com/gview?embedded=true&url=**PDFurl**");

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

WebView webView = (WebView) findViewById(R.id.my_webview);
webView.setWebViewClient(new MyWebViewClient());
webView.addView(webView.getZoomControls());
webView.getSettings().setJavaScriptEnabled(true);
webView.loadUrl("http://docs.google.com/gview?embedded=true&url=http://myurl.com/demo.pdf");

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

WebView webView = (WebView) findViewById(R.id.my_webview);
webView.setWebViewClient(new MyWebViewClient());
webView.addView(webView.getZoomControls());
webView.getSettings().setJavaScriptEnabled(true);
webView.loadUrl("http://docs.google.com/gview?embedded=true&url=http://myurl.com/demo.pdf");

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

private WebView webViewActionView;

@Override
protected void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  setContentView(R.layout.activity_main);
  // this.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);

  InputStream stream = null;

try{
    stream = getAssets().open("backtest.gif");

}catch (Exception e){
    e.printStackTrace();
  }

  webViewActionView = (WebView)findViewById(R.id.webViewActionView);
  webViewActionView.setWebViewClient(new MyWebViewClient());
  webViewActionView.getSettings().setJavaScriptEnabled(true);

  GifView view = new GifView(this, stream);
  webViewActionView.addView(view);

}

代码示例来源:origin: open-android/JieCaoVideoPlayer

layoutParams.height = JCUtils.dip2px(WebViewActivity.this, height);
  layoutParams.width = JCUtils.dip2px(WebViewActivity.this, width);
  mWebView.addView(webVieo, layoutParams);
} else {
  JCVideoPlayerStandard webVieo = new JCVideoPlayerStandard(WebViewActivity.this);
  layoutParams.height = JCUtils.dip2px(WebViewActivity.this, height);
  layoutParams.width = JCUtils.dip2px(WebViewActivity.this, width);
  mWebView.addView(webVieo, layoutParams);

相关文章

WebView类方法