0
1.3kviews
Explain UI layouts available in Android environment.

Subject: Mobile Computing

Difficulty: Medium

Marks: 4 Marks


1 Answer
0
16views

UI Layouts:

  • UI Layouts are subclasses of ViewGroup class.
  • Typical layout defines the visual structure for and Android user interface and can be created either at run time using view/ViewGroup objects or you can declare your layout using XML file main_layout.xml which is located in res/layout folder of your project.

enter image description here

There are number of layouts provided by Android which you will use in almost all the Android applications to provide different view, look and feel.

  1. Linear Layout- aligns children in single direction, vetically or horizontally
  2. Relative Layout- Displays child views in relative position
  3. Table Layout- Table Layout enables you views into rows and columns
  4. Absolute Layout- Absolute layout enables you to specify the exact location of its children.
  5. Frame Layout- The Frame layout is a placeholder on screen that you can use to display a single view.
  6. List view- It displays a list of scrollable items.
  7. Grid view- It is a Viewgroup that displays items in a two dimensional, scrollable grid.

Layouts has a set of attributes which defines the visual properties of that layout.

For Example:

android : id, android : layout_width

android : layout_height, android : layout_marginTop,

android : layout_marginleft, android : layout_marginright

etc

Please log in to add an answer.