Eduardo Reis
Eduardo Reis

Reputation: 1971

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?

Upvotes: 4

Views: 1824

Answers (1)

Eduardo Reis
Eduardo Reis

Reputation: 1971

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);

Upvotes: 11

Related Questions