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(安卓)activity属性
- Android打开系统设置界面
- android:windowSoftInputMode属性使用
- android UI进阶之弹窗的使用(2)--实现通讯录的弹窗效果
- Android关于RecyclerView 设置选中效果和AndroidTV Item选中效果
- 在android中button响应的两种方式
- Android(安卓)动画——属性动画Property Animation
- 【Android进阶】android:configChanges属性总结
- Android(安卓)第五天 (下午)