Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Constraints altering View visibility

Why does void ConstraintSet.applyToInternal(ConstraintLayout constraintLayout); changes the View visibility?

It is not preserving my View visibility. Is there a way to preserve it?

like image 797
Eduardo Reis Avatar asked Jan 04 '23 20:01

Eduardo Reis


1 Answers

I just noticed that the View visibility is treated as part of the constraints. Set it with

ConstraintSet set = new ConstraintSet();
set.setVisibility(checkIcon.getId(), INVISIBLE);
set.applyTo(container);
like image 50
Eduardo Reis Avatar answered Jan 06 '23 08:01

Eduardo Reis