android RelativeLayout中android:layout_marginBottom的不起作用问题

RelativeLayout布局中:

1、当设置为android:layout_height="wrap_content"时,最下面的控件layout_marginBottom属性无效,如果其他控件使用layout_above让自己处于最下面的控件之上,那么layout_marginBottom属性有效。


2、当设置为android:layout_height="match_parent"时,或者高度为固定值,那么最下面的控件layout_marginBottom属性才会有效。

在部分系统手机上android:layout_marginBottom不起作用(据我测试4.0到4.4.4系统上有这样的问题,高版本的系统没这个问题)

猜你喜欢

转载自blog.csdn.net/gjd1988/article/details/79281747
今日推荐