Android - GUI (Layout)

Card Puncher Data Processing

About

The graphical user interface for an Android app is built using a hierarchy of UI elements where:

  • ViewGroup (Layout) objects are invisible container element (and therefore one is at the top). Layouts are invisible containers that control how its child views are positioned on the screen.
  • View objects (Widget: button, text, …). Views are rectangle on the screen.

You can declare then a user interface by building a viewgroup

Android Ui Hierarchy

The UI elements are instantiated from an activity or a fragment (sub-activity). They instantiated what is called as the main thread.

From a performance point of view, you are better off with more siblings and less children in your UI hierarchy (no more than 18 views in total or 10 nested views).

Declaration

The GUI can be declared:

You can declare a user interface (that always start with a viewGroup then) in two ways:

  • Declare UI elements in XML. In general, element names correspond to class names and attribute names correspond to methods.
  • Instantiate layout elements at runtime. Your application can create View and ViewGroup objects (and manipulate their properties) programmatically.

Design

UI - Material Design

Debugging

Android Show Layout Bounds

Documentation / Reference





Discover More
Card Puncher Data Processing
Android - (Views) Hierarchy Viewer

GUI: View hierarchy viewer. Hierarchy Viewer only works by default with phones running a developer version of the Android OS. If your phone is not a developer phone, you have a few options: If...
Android Tablet Handset Design
Android - Fragment (with or without UI)

Fragment is sort of like a “sub Activity” that you can reuse in different activities. Each fragment should be designed as a modular and reusable activity component because each fragment defines: ...
Card Puncher Data Processing
Android - Getting Started

See See Run Apps on a Hardware Device Enable USB debugging in the device system settings, under Settings > Developer...
Android Xml Layout Attribute Reference
Android - Layout File (XML)

A layout XML is a declarative way of creating an UI. To define the GUI in android, you can do it: at runtime in the code with the ViewGroup object (UI container) and View obejct (widgets) at load...
Android Tablet Handset Design
Android - Responsive Design (Multiple screens)

Responsive UI in Android. See also: See A modular fragment allows you to change your fragment combinations for different screen sizes. ...
Responsive Layout Android
Android - ViewGroup (Layout)

A viewGroup is: a composite (%%view|widget) GUI (ie a container for simple GUI) also the top element of the Android user interface design and is then the start point of GUI definition. The android/view/ViewGroupViewGroup...



Share this page:
Follow us:
Task Runner