android 关于webview缩放和适应屏幕的问题

进击的乌龟 2015-01-22 05:12:40





我用webview来加载一段html,结果和代码如上图,问题:为什么webview不是占据整个屏幕大小,我在xml里布局的时候webview是充满整个屏幕的,现在变小了?!居然只有屏幕顶端到红线那里那么高


...全文
725 6 打赏 收藏 举报
写回复
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
  • 打赏
  • 举报
回复
你对html做了什么才变好的
进击的乌龟 2015-04-23
  • 打赏
  • 举报
回复
原来是html的问题
哎,真难 2015-01-23
  • 打赏
  • 举报
回复
肯定哪里写错的呗
liquanle 2015-01-23
  • 打赏
  • 举报
回复
你把layout的代码也贴一下呀。
进击的乌龟 2015-01-23
  • 打赏
  • 举报
回复
引用 2 楼 heaimnmn 的回复:
肯定哪里写错的呗
就是不知道哪里才问的,求帮忙
进击的乌龟 2015-01-23
  • 打赏
  • 举报
回复
引用 1 楼 liquanle 的回复:
你把layout的代码也贴一下呀。
layout的代码没什么特别的:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical" >

    <WebView
        android:id="@+id/webView1"
        android:layout_width="match_parent"
        android:layout_height="match_parent" />

</LinearLayout>
发帖
Android

8.0w+

社区成员

移动平台 Android
androidandroid-studioandroidx 技术论坛(原bbs)
社区管理员
  • Android
  • yechaoa
  • 失落夏天
加入社区
帖子事件
创建了帖子
2015-01-22 05:12
社区公告
暂无公告