MotionLayout: MotionScene OnClick overrides setOnClickListener

后端 未结 7 1580
庸人自扰
庸人自扰 2021-02-13 19:02

I\'m just starting to play with MotionLayout. I have defined an activity layout using MotionLayout that uses a MotionScene to hide and sh

7条回答
  •  猫巷女王i
    2021-02-13 19:37

    I just used this hack: click is handled programmatically, but it triggers the hidden view, on which is registered in MotionScene:

    actualVisibleView.setOnClickListener {
                doSomeLogic()
                hiddenView.performClick()
            }
    

    And in MotionScene:

    
    
            
    
    

提交回复
热议问题