codelab-constraint-layout icon indicating copy to clipboard operation
codelab-constraint-layout copied to clipboard

2.0 beta-3 issue onTransitionCompleted never called

Open Only-IceSoul opened this issue 6 years ago • 0 comments

onTransitionCompleted never called using TransitionToEnd/start, i am changing motion progress with scroll offset.

Code OnTouchListener:

if(event.actionMasked == MotionEvent.ACTION_MOVE) { motionLayout.progress = offsetProgress }

if(event.actionMasked == MotionEvent.ACTION_UP) {

            if (motionLayout.progress < 1f && motionLayout.progress > 0) {
                if (motionLayout.progress > 0.5f) {

                    motionLayout.transitionToEnd()
             
                } else {
                    // to start
                    motionLayout.transitionToStart()
                }
            }

Only-IceSoul avatar Oct 24 '19 16:10 Only-IceSoul