android / views-widgets-samples

Multiple samples showing the best practices in views-widgets on Android.
Apache License 2.0
5.05k stars 3.01k forks source link

MotionLayout: Fragment Transition Example (2/2) #47

Open viyski opened 5 years ago

viyski commented 5 years ago

move the blue button open the ListFragment, after scroll the list and go back the MainFragment,happen crash.

the exception trace: java.lang.NullPointerException: Attempt to invoke interface method 'void androidx.core.view.NestedScrollingParent2.onStopNestedScroll(android.view.View, int)' on a null object reference at com.google.androidstudio.motionlayoutexample.utils.TouchFrameLayout.onStopNestedScroll(TouchFrameLayout.java:59) at androidx.core.view.ViewParentCompat.onStopNestedScroll(ViewParentCompat.java:284) at androidx.core.view.NestedScrollingChildHelper.stopNestedScroll(NestedScrollingChildHelper.java:188) at androidx.recyclerview.widget.RecyclerView.stopNestedScroll(RecyclerView.java:11379) at androidx.recyclerview.widget.RecyclerView$ViewFlinger.run(RecyclerView.java:5251) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:911) at android.view.Choreographer.doCallbacks(Choreographer.java:686) at android.view.Choreographer.doFrame(Choreographer.java:619) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:897) at android.os.Handler.handleCallback(Handler.java:739) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:148) at android.app.ActivityThread.main(ActivityThread.java:7331) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1321) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1211)