android:layout_gravity="bottom"不起作用问题
16lz
2021-12-04
布局layout时, 发现设置了android:layout_gravity="bottom"后view并没有底对齐, 查了下, 原来如下:
对于 LinearLayout
当 android:orientation="vertical"时, 只有水平方向的设置才起作用,垂直方向的设置不起作用。即:left,right,center_horizontal 是生效的。
当 android:orientation="horizontal" 时, 只有垂直方向的设置才起作用,水平方向的设置不起作用。即:top,bottom,center_vertical 是生效的。
更多相关文章
- 【Android(安卓)Studio】Android(安卓)Studio 安装及设置
- Android(安卓)shell 创建 模拟器
- android 属性个人收集 android:visibility
- Android界面基本属性
- android:configChanges 横竖屏切换的生命周期
- Android横竖屏切换小结
- ListView使用技巧(二):相关设置
- android布局layout中的一些属性
- [Android]新功能引导高亮显示遮罩层View