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
android.support.constraint.Group has a public method
public void updatePreLayout(ConstraintLayout container) { ... }
that updates children visibilities, so calling
dataGroup.visibility = if (visible) View.VISIBLE else View.INVISIBLE dataGroup.updatePreLayout(root)
worked for me