android:visibility changes to children of MotionLayout

前端 未结 5 1813
灰色年华
灰色年华 2020-12-05 10:18

I must be missing something with android:visibility changes within a motion layout. Here’s a simplified version of my layout.


 

        
5条回答
  •  天命终不由人
    2020-12-05 10:54

    Programmatically way

    View clickableArea = motionLayout.findViewById(R.id.video_overlay_thumbnail);    
    motionLayout.getConstraintSet(R.id.start).getConstraint(clickableArea.getId()).propertySet.mVisibilityMode = 1; // 1 - ignore or 0 - normal
    clickableArea.setVisibility(GONE);
    

提交回复
热议问题