android-constraint-layout-cheatsheet icon indicating copy to clipboard operation
android-constraint-layout-cheatsheet copied to clipboard

Add demo for `ConstraintLayout` feature for dimension constraints - WRAP_CONTENT

Open noorejannat opened this issue 7 years ago • 0 comments

WRAP_CONTENT : enforcing constraints (Added in 1.1)

If a dimension is set to WRAP_CONTENT, in versions before 1.1 they will be treated as a literal dimension -- meaning, constraints will not limit the resulting dimension. While in general this is enough (and faster), in some situations, you might want to use WRAP_CONTENT, yet keep enforcing constraints to limit the resulting dimension. In that case, you can add one of the corresponding attribute:

  • app:layout_constrainedWidth=”true|false”
  • app:layout_constrainedHeight=”true|false”

noorejannat avatar May 27 '18 22:05 noorejannat