More Fun with ConstraintLayout
There are many more capabilities of ConstraintLayout
than what we have covered here. You can:
- Use
Guideline
to set up anchoring points, a bit likeBarrier
, but set at arbitrary locations - Use
app:layout_constraintWidth_percent
andapp:layout_constraintHeight_percent
to size children as a percentage of theConstraintLayout
size along a particular axis - Use
app:layout_constraintDimensionRatio
to force a child to adhere to a particular aspect ratio - Use
ConstraintSet
to alter the anchoring and sizing rules for children ofConstraintLayout
at runtime - And more!
We will see ConstraintLayout
used in many of the samples through the rest of the book.
Prev Table of Contents Next
This book is licensed under the Creative Commons Attribution-ShareAlike 4.0 International license.