Is there any equivalent command to the mentioned Iayout-weight to dynamically define the height of more than one View inside a LinearLayout? I want to have a LinearLayout with orientation="vertical" and then split that height to a defined ratio, but I can't find any command for that.
5071 次
2 に答える
8
You don't need an equivalent to layout-weight
, you just use that. Set your width to a value you want, set height to be 0dp and set the weight to be in proportion to what you want.
于 2012-12-21T11:00:11.760 に答える
4
whenever you use layout-weight
. if you give width as 0dp
then it weight is applicable for width. like that for height also
于 2012-12-21T11:02:46.250 に答える