【问题标题】:Webview Width compared to Android Browser WidthWebview 宽度与 Android 浏览器宽度的比较
【发布时间】:2023-04-10 12:41:01
【问题描述】:

所以我创建了一些 html 页面以通过 WebView 嵌入到应用程序中,这些页面本身在普通的 android 浏览器中工作正常但是在 WebView 模块中页面的宽度只有 313,它允许有点水平滚动,这在 Android 的普通浏览器中不会发生。

所以所需的宽度是320px,WebView 正在输出313px,但仍然允许水平滚动(几个像素)。

以下是我的布局代码,我假设 Android 正在将一些我不知道的内联样式注入到 webview 中,想知道是否有人遇到同样的问题?

 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical" >

    <WebView
        android:id="@+id/help_webview"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent" />

</RelativeLayout>

【问题讨论】:

标签: android android-layout webview


【解决方案1】:
猜你喜欢
  • 1970-01-01
  • 2013-01-13
  • 2017-11-11
  • 1970-01-01
  • 2015-03-17
  • 1970-01-01
  • 2016-02-15
  • 1970-01-01
  • 2013-02-06
相关资源
最近更新 更多