By the name you can come to know LinearLayout
adds view linearly either vertical or horizontal by the orientation set by you. It will add views one after another which will depend on the requirement of the design. And RelativeLayout
adds view related with each other,there is no need to declare orientation in RelativeLayout
.
As for example you want to add two TextView
s one under another so you will add first TextView
and refer the second TextView
with the first TextView
by adding android:layout_below="first textview's id"
in the XML file. This way you can deal with RelativeLayout
.