From the course: Android Development Essential Training: 2 User Interface Design

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Manage positions with constraints

Manage positions with constraints - Android Tutorial

From the course: Android Development Essential Training: 2 User Interface Design

Start my 1-month free trial

Manage positions with constraints

- [Instructor] Constraint layout is the latest way to define complex layouts that avoid nested view hierarchies. It does this by means of constraints, that define how child views are laid out relative to each other, and the parent. To define the views position and constraint layout, you must add at least one horizontal and one vertical constraint. Each constraint defines the views position, along either the vertical or horizontal axis. So, each view must have a minimum of one constraint for each axis. The circles in the middle of each edge are the constraint handles. These are used to create constraints. The constraint handles are all empty in this image, which indicates that no constraint has been defined for them. But once constraints are defined, the constraint handles will become filled, as you see here in the after image. Although you mostly work with constraint layout in the visual editor, it's helpful to…

Contents