Thursday, 17 September 2015

xml design tips

1. if u want want stuffs to be in the horizontal line all together

put them in a single new  linear layout
make android:orinetation=horizontal ,
but that makes others shift to other end where we cant see them

of the individual elements,
set width = match_parent
height= wrap_content

now the magic happens when if the linear layout we add
android:weightSum="100"  // can be anything

in the elements add
android:layout_weight="50"// shares half the width of the parent

No comments:

Post a Comment