10

I am using MotionLayout for my page. I have two states which is toggled with OnSwipe of a view:

<Transition
    motion:constraintSetStart="@+id/start"
    motion:constraintSetEnd="@+id/end"
    motion:duration="700"
    motion:motionInterpolator="easeIn">
    <OnSwipe
        motion:dragDirection="dragUp"
        motion:touchAnchorId="@+id/view"
        motion:touchAnchorSide="bottom"
        motion:touchRegionId="@+id/view" />
</Transition>

I also want to add OnClickListener to this view from code, or add new Transition in scene.xml file, which will do something different then OnSwipe Transition and will be triggered with OnClick of the same view. But both of them blocks OnSwipe. So Is there a way to have OnSwipe and OnClick on the same view?

Thank you

Nikoloz14
  • 207
  • 4
  • 13
  • 1
    you can create custom click listener in motion editor and make separate motion scene for that action – d-feverx Dec 27 '20 at 15:40

0 Answers0