question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Motion scene not triggering with NestedScrollView as anchor point in beta02

See original GitHub issue

Hi there!

I have a scenario which works fine on 2.1-beta01 and before but breaks on beta02.

I have the following transition

     <Transition
        android:id="@+id/transition"
        app:constraintSetEnd="@id/collapsed"
        app:constraintSetStart="@id/expanded"
        app:duration="1000"
        app:motionInterpolator="easeInOut">
        <OnSwipe
            app:dragDirection="dragUp"
            app:moveWhenScrollAtTop="true"
            app:touchAnchorId="@id/nsv_container"
            app:touchAnchorSide="top" />
    </Transition>

The layout I’m using has a MotionLayout as the parent and a child NestedScrollView which contains a LinearLayout with some chid views. Before beta02, the Motion animation would trigger as soon as I started scrolling the contents of the NestedScrollView but on beta02, I have to reach the bottom of the NestedScrollView to trigger it.

The layout is company code so I can’t share it but I think I’ve given enough context as to what’s happening.

Edit: More context, the MotionLayout is used to create a “Collapsing Toolbar” style animation, nothing too complex.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5

github_iconTop GitHub Comments

3reactions
jafu888commented, May 17, 2021

This will be fixed in next build.

1reaction
gusandrianoscommented, Jul 26, 2021

As of 2.1.0-rc1, this is working fine!

Read more comments on GitHub >

github_iconTop Results From Across the Web

NestedScrollView not working with MotionLayout
I added a NestedScrollView to my layout and what was working perfectly before no longer works. The motion layout went from being smooth...
Read more >
MotionLayout is not working well as a child of a ... - GitHub
The NestedScrollView blocks the dragging events from getting to my RecyclerView. When I'm changing MotionLayout to ConstraintLayout everything ...
Read more >
MotionLayout issues : r/androiddev - Reddit
Spinners onItemSelected method does not get triggered. ... If not, it is in NestedScrollView because motion scene has on swipe attribute ...
Read more >
MotionLayout inside ScrollView does not properly adjust ...
It appears to adjust properly when I remove the ScrollView. If I have a layout and then trigger a motion scene that expands...
Read more >
constraintlayout - bytemeta
Motion scene not triggering with NestedScrollView as anchor point in beta02 ... [Bug] Motion Layout Transitions Not Working When Inside A Recycler View....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found