我在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大小怎么改 她都是全屏显示网页
你的WebView这么写:
android:layout_height = "0dp"
android:layout_weight = "1"
就能实现目的了
下面的四个按钮是放在webview里的还是webview外的?
你要用相对布局(Relativelayout),webview长宽设为全局,底部四个按钮放在最底部
最外层用linearlayout 方向设置为垂直 然后设置 webview 的 layout_height 为0dp layout_weight 为1 , 下面的布局设置为 warp_content或固定高度就好了
你的WebView这么写:
android:layout_height = "0dp"
android:layout_weight = "1"
就能实现目的了