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
Had the same problem and nothing from above helps. My solution was to setVisibility(viewId, ConstraintSet.VISIBLE) inside constraint set and apply that to ConstraintLayout view.
For example:
myContstraintSet.apply {
setVisibility(firstGroup.id, ConstraintSet.VISIBLE)
setVisibility(secondGroup.id, ConstraintSet.GONE)
connect(oneView.id, ConstraintSet.BOTTOM, R.id.secondView, ConstraintSet.TOP)
clear(anotherView.id, ConstraintSet.TOP)
}
myContstraintSet.applyTo(myConstraintLayout)