top of page

Android Layouts

 As you very well know that, all your interactions with your Android app is through the user interface or UI like button, text view etc., it is very important to understand the User Interface in Android Apps before getting into becoming a successful android app developer.   

 

A Layout provides the visual structure and in what manner, the screen components will appear on your screen. First, let us try to understand what are these layouts actually. 

 

To define any UI element, we need to import the View class. The View class is the super class, or parent class for all the GUI components or widgets such as Button, text, Image etc. View class occupies a rectangular area on your App screen. The rectangle can not be seen but still occupies a shape.

​

Next to this, is the ViewGroup class, which extends the View Class. The Layouts are basically objects of this 'ViewGroup' Class. So we can say that the ViewGroup class can hold the Layouts such as linear layout, frame layout, relative layout etc. and also the weidgets. 

​

Both view and viewgroup can be defined by following two methods

 

  • Programmatically, during runtime 

  • In XML. 

​

Common Android Layouts are :

​

  1. Linear Layout

  2. Frame Layout

  3. Relative Layout

  4. Frame Layout

  5. Grid Layout

  6. Coordinator Layout

​

bottom of page