In part 4 of the ConstraintLayout tutorial, we will learn how to use some of the new features and helpers of version 1.1.0 of the ConstraintLayout.
We will set the app:layout_constrainedWidth attribute to true to make a view with a width of wrap_content shrink to it’s constraints’ width if they are smaller than it’s wrap_content width. And vice versa there is also an app:layout_constrainedHeight attribute for the height.
We will also learn how to use the app:layout_constraintWidth_percent and app:layout_constraintHeight_percent attributes to set the size of a view as a percentage of the parent layout, and how to use barriers to move views dynamically when other views grow in size, by referencing them in the app:constraint_referenced_ids attribute. With the app:barrierAllowsGoneWidgets attribute we can change if the barrier should be constrained by widgets with a visibility of gone.
And lastly we will learn how to reference and use groups to change the visibility state of multiple views at once, either directly in xml or in Java code.