--ADVERTISEMENT--

In Android, LinearLayout is a common layout. LinearLayout arranges its children in a single direction either vertical or horizontal. In this example you will learn to create android application using LinearLayout.

Related:
Android Relative Layout Example
How to Change Android Button on Click/Press Color
Android Elevation Example
Android ActionBar Tabs Example

Vertical Linear Layout in Android


Following is the XML file of vertical LinearLayout.
res/layout/vertical_linear_layout.xml

Now, run your vertical linear layout android application which looks like this.

Android Vertical Linear Layout Example

Horizontal Linear Layout in Android


Following is the XML file of horizontal LinearLayout.
res/layout/horizontal_linear_layout.xml

Now, run your horizontal linear layout android application which looks like this.

Android Horizontal Linear Layout Example

Post a Comment

Powered by Blogger.