Linear Layout in Android

Linear layout is a simple layout used in android for layout designing.

In the Linear layout all the elements are displayed in linear fashion means all the childs/elements of a linear layout are displayed according to its orientation.

The value for orientation property can be either horizontal or vertical.

 

 

There are two types of linear layout orientation:

  1. Vertical
  2. Horizontal

Main Attributes in Linear Layout :

  1. Orientation
  2. Gravity
  3. Layout_weight

Linear Layout Example :

Activity_Main

Main Activity.java

Output :-

Linear Layout

About Jaimin Patel

I am a Web Developer. I have been blogging and researching since 1 years and like to share my knowledge and research with the world. Peace..!!

View all posts by Jaimin Patel →

Leave a Reply

Your email address will not be published. Required fields are marked *