daquexian
daquexian

Reputation: 179

How can I treat several views as one in ConstraintLayout

I want set visibility of several views programmatically. Is there some way to treat them as one single view(or viewgroup)?

Upvotes: 0

Views: 66

Answers (1)

Cheticamp
Cheticamp

Reputation: 62841

Take a look at a new feature in ConstraintLayout "group". By grouping views in ConstraintLayout using this feature you can set their visibility as one. See this Medium Post.

Group

Groups, like the Guidelines, are widgets with size 0. But Group helps to apply some action to a set of widgets. The most common case, is to control a visibility of a collection of widgets.

Upvotes: 1

Related Questions