Tags
Asked 3 years ago
17 Nov 2020
Views 444
python

python posted

what is Linear Layout in android ?

what is Linear Layout in android app coding ?

and how can i use it with my app ?
i am learning the code so please explain it
rajiv

rajiv
answered Nov 30 '-1 00:00

Linear layout is the layout where all the elements reside in linear. it's not a relative layout so you cant set it relative to other

Two types of Liner layout is
Vertical
which is specified by android:orientation="vertical"
Horizontal
which is specified by android:orientation="horizontal"

in Vertical Linear layout , all the child elements are arranged vertically in a line one after the other.
in Horizontal Linear layout , all the child elements are arranged horizontally in a line one after the other.

android:layout_weight is applied to child for specifying how much weight consume in layout
Post Answer