Android(安卓)UI布局中设置了fill_parenet仍然没有全屏的解决办法
16lz
2021-12-04
在开发过程中,发现了有时候即便是android:layout_width和android:layout_height都设置成了fill_parent,如下面示例中的paraTableLayout仍然没有全屏显示
<HorizontalScrollView android:layout_gravity="top" android:id="@id/horizontal" android:layout_width="fill_parent" android:layout_height="fill_parent" >
<TableLayout android:id="@id/paraTableLayout" android:background="#ff399999" android:layout_width="fill_parent" android:layout_height="fill_parent" />
</HorizontalScrollView>
解决办法是在HorizontalScrollView中添加android:fillViewport="true"即可
转自:http://blog.csdn.net/bluebluesea/article/details/8331346
更多相关文章
- Android(安卓)UI布局中设置了fill_parenet仍然没有全屏的解决办
- Android(安卓)Studio下添加assets目录
- 【Android】Android(安卓)开机广播的使用
- Android下单元测试
- android安装SDK时遇到的一些问题
- 如何进行Android单元测试
- android应用去掉title bar
- android 圆角头像
- Android(安卓)Studio导入第三方类库的方法