Official Description: ConstraintLayout for Android
ConstraintLayout is the primary option nowadays for constructing an Android
UI, in terms of controlling where individual widgets are positioned on the screen
and how they are sized.
ConstraintLayout is very flexible, allowing you to position widgets relative to:
- Each other
- The edges of the
- Guidelines (invisible lines used solely for positioning rules)
- Barriers (guidelines tied to collections of widgets)
You can easily set a widget’s horizontal or vertical size to be
(to be sized based on the widget’s contents) or
0dp (to be stretched to fill
the space between two anchoring points along the requested axis).
Compared to legacy containers like
ConstraintLayout offers more functionality and (frequently) better performance.
- Learn ConstraintLayout: ConstraintLayout Tutorial for Android (2019-04-05)
- Android ConstraintLayout explained using a complex UI (2019-03-03)
- ConstraintLayout in the LIMELIGHT (2018-12-19)
- Exploring Android: CommonsWare’s hands-on tutorial book builds a complete app from scratch, including using
ConstraintLayoutfor the layouts
- Sunflower: A gardening app illustrating Android development best practices with Android