UI Layout

Topics 

  • What is Layout & How to declare Layout ?
  • Layout File structure and location 
  • Attributes 
    • ID
    • Layout parameters 
  • Types of Layout 
    • LinearLayout
    • RelativeLayout 
    • TableLayout 
    • FrameLayout 
    • Tab layout

What is a Layout & How to declare a Layout?

What is a Layout? 

  • It defines the layout structure for the user interface in an Activity 
  • It holds all the visual elements that appear to the user

How to declare a Layout?

Two Options 

  • Option #1: Declare layout and its visual elements in XML (most common and preferred) 
  • Option #2: Instantiate a layout and its visual elements at runtime (programmatically in Java code)

Download course content