QQ863017854 2016-03-10 08:58 采纳率: 100%
浏览 2183
已采纳

Android webview布局

我在ui里设置了webview下面有图片按钮 但是实际运行的时候却显示不了
图片说明

求大神解答

** 链接是自适应屏幕的 怎么解救????**
!!

 <RelativeLayout 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/zhaopin"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="1" />

 <RadioGroup
     android:id="@+id/main_fragment_rgp"
     android:layout_width="match_parent"
     android:layout_height="46dp"
     android:layout_alignParentBottom="true"
     android:layout_weight="0.04"
     android:background="@drawable/shape_bottom_radio_group_back"
     android:checkedButton="@+id/main_rbn_news"
     android:orientation="horizontal" >

        <RadioButton
            android:id="@+id/main_rbn_news"
            android:layout_width="71dp"
            android:layout_height="match_parent"
            android:button="@null"
            android:drawableTop="@drawable/selector_rbn_news"
            android:onClick="news" />

        <RadioButton
            android:id="@+id/main_rbn_youhui"
            android:layout_width="92dp"
            android:layout_height="match_parent"
            android:button="@null"
            android:drawableTop="@drawable/selector_rbn_postbar"
            android:onClick="youhui" />

        <RadioButton
            android:id="@+id/main_rbn_zhaopin"
            android:layout_width="82dp"
            android:layout_height="match_parent"
            android:button="@null"
            android:drawableTop="@drawable/zhaopin"
            android:onClick="zhaopin" />
 <RadioButton
            android:id="@+id/main_rbn_about"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:button="@null"
            android:drawableTop="@drawable/about"
            android:onClick="about" />
    </RadioGroup>
</RelativeLayout>

无论我把webview大小怎么改 她都是全屏显示网页

  • 写回答

5条回答

  • 东风玖哥 2016-03-11 02:32
    关注

    你的WebView这么写:
    android:layout_height = "0dp"
    android:layout_weight = "1"
    就能实现目的了

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(4条)

报告相同问题?

悬赏问题

  • ¥15 WPF使用Canvas绘制矢量图问题
  • ¥15 用三极管设计一个单管共射放大电路
  • ¥15 孟德尔随机化r语言运行问题
  • ¥15 pyinstaller编译的时候出现No module named 'imp'
  • ¥15 nirs_kit中打码怎么看(打码文件是csv格式)
  • ¥15 怎么把多于硬盘空间放到根目录下
  • ¥15 Matlab问题解答有两个问题
  • ¥15 LCD12864中文显示
  • ¥15 在使用CH341SER.EXE时不小心把所有驱动文件删除了怎么解决
  • ¥15 gsoap生成onvif框架