O'Reilly logo

Mastering Android Studio 3 by Kyle Mew

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Applying constraints

The best way to see how this works is to try it, as these few simple steps will demonstrate. Create a ConstraintLayout as described previously and drag and drop one or two views or widgets from the palette onto the blueprint screen, similar to following figure:

Constraint handles

Each view has constraint handles on its corners and its sides. Those on the corners are for simply resizing a view in the way that we are all familiar with. Those along the sides, however, are used to create constraints. These position views are relative to their parents or each other in a way that is not dissimilar to the relative layout.

As ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required