When i try to set the visibility of the group on button click,it doesn\'t affect the view\'s visibility.Using com.android.support.constraint:constraint-layout:1.1.0-beta4. I
You can also simply call requestLayout
method after changing Group visibility to View.INVISIBLE
.
fun makeGroupInvisible(group: Group) {
group.visibility = View.INVISIBLE
group.requestLayout()
}
Problem is that android.support.constraint.Group
updates visibility of its members in updatePreLayout
method which is called from onMeasure
in ConstraintLayout
.