What does android:layout_weight mean?

前端 未结 13 1238
遇见更好的自我
遇见更好的自我 2020-11-21 06:14

I don\'t understand how to use this attribute. Can anyone tell me more about it?

13条回答
  •  北恋
    北恋 (楼主)
    2020-11-21 06:59

    Combining both answers from

    Flo & rptwsthi and roetzi,

    Do remember to change your layout_width=0dp/px, else the layout_weight behaviour will act reversely with biggest number occupied the smallest space and lowest number occupied the biggest space.

    Besides, some weights combination will caused some layout cannot be shown (since it over occupied the space).

    Beware of this.

提交回复
热议问题