I'm experimenting with "Constraint.Group"
and I've children views: A, B, C.
In code, "Constraint.Group".visibility = View.Gone
does work, but if I choose to do A.visibility = View.Gone
it does not take an effect on children view. Is this normal behaviour?
Update: The behavior of individual view visibility within a group has been change and is reported as fixed in ConstraintLayout version 2.0.0 beta 6. See bug fixes for ConstraintLayout 2.0.0 beta 6 .
It does look like group visibility trumps the visibility of individual views of the group. This makes sense since each view has some visibility defined (GONE
, VISIBLE
, INVISIBLE
) so, if an individual view's visibility setting was honored, the integrity of the group would be violated. In other words, the individual view we changed the visibility of would, in essence, not be part of the group.