How can I disable all views inside the layout?

后端 未结 23 1415
一个人的身影
一个人的身影 2020-11-28 08:46

For example I have:



        
23条回答
  •  一个人的身影
    2020-11-28 09:48

    In Kotlin, you can use isDuplicateParentStateEnabled = true before the View is added to the ViewGroup.

    As documented in the setDuplicateParentStateEnabled method, if the child view has additional states (like checked state for a checkbox), these won't be affected by the parent.

    The xml analogue is android:duplicateParentState="true".

提交回复
热议问题