【问题标题】:It is mandatory to set a layout in a webview android app?必须在 webview android 应用程序中设置布局吗?
【发布时间】:2017-02-25 22:19:24
【问题描述】:

我是开发安卓应用的新手 我已经用 HTML5、PHP、SQL 等完成了我的所有应用程序,所以我想制作一个带有链接到我网站的 webview 组件的 android 应用程序。 我应该向我的应用添加根布局还是只添加 webview 就可以了?

【问题讨论】:

    标签: android layout webview


    【解决方案1】:
    WebView webView =new WeView(this);
    ..
    ..//Config webview properties
    ..
    setContentView(webView);
    

    在你的 Activity 的 onCreate 中这样做应该没问题

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-05-01
      相关资源
      最近更新 更多