LinearLayout is one of the easiest and commonly used layouts available to Android developers to arrange different views on the device screen. LinearLayout arranges its child views in a single row (horizontally) or a single column (vertically). In this tutorial, I will show you how you can use LinearLayout and how the views can be arranged inside LinearLayout.
Create a new Android project in Eclipse with MainActivity as your default Activity and main.xml as your default layout file. Add the following code in your main.xml file.