android:layout_width和android:layout_height在容器中的关系是什么?
例如,如果我有一个LinearLayout,其布局宽度和高度设置为fill_parent,并且我有一个Button,其值设置为wrap_content,它使用Button中的值,就像LinearLayout上的Button值一样 .
但是,如果我交换它们以使LinearLayout值都是wrap_content而Button值现在是fill_parent,它仍然使用wrap_content,这次不会覆盖值,而是使用LinearLayout提供的值 .
有人可以解释他们之间的关系,因为这对我来说很困惑吗?
谢谢
居鲁士
1 回答
http://developer.android.com/guide/topics/ui/how-android-draws.html本文解释得非常好