Android how to get components inside a layout to take up an equal percentage of space
For examples two buttons inside a linear layout or a relative layout. Have each b开发者_如何学JAVAutton always take up 50% of space in parent container. How is this specified? Thanks
<LinearLayout>
<Button
layout_weight="0.5"
/>
<Button
layout_weight="0.5"
/>
</LinearLayout>
each button will take 50% of the linearLayout.
精彩评论