问题 layout_height =“0dp”是什么意思? [重复]


这个问题在这里已有答案:


4918
2017-08-07 20:34


起源

这个问题已被问及并回答 这里 - Earl
谢谢你指出......这绝对有帮助.. - user862268
“0dp”与其他问题的“0dip”相同吗? - Bill the Lizard
是的,“dp”和“dip”是等价的。 资源 - theisenp


答案:


当设置为“0dp”时,高度或宽度大多与“重量”组合使用。例如你想填补所有可用空间的高度:

android:layout_height = "0dp"
android:layout_weight = "1.0"

13
2017-08-09 05:22