android ui重叠,Android UI重叠问题

但是,我当前具有如图所示的布局,但是(如可在xml中看到的那样),WebView具有预定义的layout_height值。我只是想要这个确切的外观,但是一个不需要预定义值的可扩展版本。因此,明亮的蓝色部分应该有一个与按钮成比例的高度,并且应该始终位于底部,并且具有URL EditText等的顶部栏应该以相同的方式起作用。所以WebView应该能够扩展到任意大小,以确保所有空间都被占用。Android UI重叠问题

309b2eb20794517a46255efb31d87572.png

xmlns:tools="http://schemas.android.com/tools"

android:layout_width="match_parent"

android:layout_height="match_parent"

android:background="@android:color/black"

tools:context=".MainActivity" >

android:id="@+id/fullscreen_content_controls"

style="?buttonBarStyle"

android:layout_width="match_parent"

android:layout_height="fill_parent"

android:orientation="vertical"

android:focusable="true"

android:focusableInTouchMode="true">

android:layout_width="match_parent"

android:layout_height="wrap_content"

android:layout_marginTop="9dp"

android:padding="5dp">

android:layout_width="match_parent"

android:layout_height="match_parent"

android:orientation="horizontal" >

android:id="@+id/editText1"

android:layout_width="284dp"

android:layout_height="wrap_content"

android:layout_weight="0.97"

android:ems="10"

android:hint="Enter URL"

android:imeOptions="actionGo"

android:singleLine="true"

android:textColor="@android:color/darker_gray"

android:inputType="textNoSuggestions">

android:id="@+id/button1"

android:layout_width="30dp"

android:layout_height="31dp"

android:layout_marginRight="5dp"

android:background="@android:drawable/btn_dialog" />

android:id="@+id/progressBar1"

style="?android:attr/android:progressBarStyleSmall"

android:layout_width="wrap_content"

android:layout_height="match_parent"

android:layout_weight="0.10" />

android:id="@+id/fullscreen_content"

android:layout_width="match_parent"

android:layout_height="724dp"

android:layout_gravity="center"

android:layout_weight="0.75"

android:keepScreenOn="true" />

android:id="@+id/controlLinearLayout"

android:layout_width="match_parent"

android:layout_height="wrap_content"

android:layout_weight="0.97"

android:background="@android:color/holo_blue_bright" >

android:id="@+id/button2"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:text="Button" />

+0

你有没有在设备上运行该/不同大小的仿真器,看它是否是正确的?我也建议不要使用严格的数字宽度值。例如,使用EditText,您可以将其设置为match_parent,然后为其他位添加余量。 –

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值