Android Layouts

Spread the love

A generic ViewGroup that defines a structure for the views it contains.

1.Linear Layout
2.Relative Layout
3.Table Layout
4.List View
5.Grid View
6.Web View

     Linear Layout

  • Child Views are arranged in a horizontal or vertical row.
5

<LinearLayout
   
android:layout_width=”match_parent
   
android:layout_height=”wrap_content
   
android:background=”@color/bg
   
android:clipToPadding=”false”
   
android:gravity=”center”
   
android:orientation=”horizontal>

</LinearLayout>

 

 

  Relative Layout

  • Child Views are positioned relative to each other and parent view.

<RelativeLayout
   android:layout_width=”match_parent”
   android:layout_height=”405dp”> 

</ RelativeLayout >

6

Table Layout

  • Child Views are arranged in to rows and columns.

List View

  • Displays a scrolling single column list.
7

Grid View

  • Child views are arranged in to a two dimensional, scrollable grid.
8

Web View

  • Displays web pages.
9
About Chandana Nalin Cooray 75 Articles
Chandan is a tech enthusiast and digital strategist with over 5 years of experience in Artificial Intelligence and Software development. He specializes in simplifying complex tech trends for global audiences. When he’s not reviewing the latest AI tools, he shares his insights on future technology on chandanai.com. Follow him on LinkedIn for more tech updates