How to group multiple views in a ConstraintLayout

前端 未结 2 1788
滥情空心
滥情空心 2021-02-01 02:52

I have added 3 buttons in a ConstraintLayout. I have added a button to disable or enable these buttons.

If I was using normal LinearLayout. I could have put all the butt

2条回答
  •  花落未央
    2021-02-01 03:31

    Currently there is no way you can do that. You have to disable each button individually, because constraints are added to each widget in constraintlayout.

    To group views, you need to use view groups, that doesn't make sense in the context of constraint layout.

    Edit

    With Constraint layout:1.1.0-beta1, you can group views using android.support.constraint.Group.

提交回复
热议问题