Fixed
Status Update
Comments
le...@gmail.com <le...@gmail.com> #2
Nested scrolling works partially (as per http://b/122818889 ). Let's discuss if we need full support and if so make sure it works.
il...@google.com <il...@google.com>
ap...@google.com <ap...@google.com> #3
Hi!
What is 'partially' exactly?
How do I see it?
Thanks!
What is 'partially' exactly?
How do I see it?
Thanks!
jb...@google.com <jb...@google.com> #4
As of now:
- Nesting scroll views with a scroll direction perpendicular to the ViewPager2's orientation inside ViewPager2 works
- Nesting scroll views with a scroll direction parallel to the ViewPager2's orientation inside ViewPager2 does not work
- Nesting scroll views with a scroll direction perpendicular to the ViewPager2's orientation inside ViewPager2 works
- Nesting scroll views with a scroll direction parallel to the ViewPager2's orientation inside ViewPager2 does not work
Description
The
MainActivity
gets leaked after the second time the orientation changes, but only after navigating to a new destination using thenavHostController
.A working project where this can be reproduced is available here .
These are the reproduction steps:
FooScreen
, that only contains aTopAppBar
and aButton
).Button
(it will load theBarScreen
, that only contains aTopAppBar
)At this point you should see
StrictMode
complaining about the leak inside the logcat:The LeakCanary notification should also be visible . This is the LeakCanary log:
Things I have noticed:
adb shell am start -d "template://bar" -a android.intent.action.VIEW
)I've also tried to use the Android Studio Profiled to investigate the leak, but I wasn't really successful. Here some screenshots:
This is the overview of the modules of the repro project: enter image description here
In short, the App only has the single Activity with no logic beside setting up the nav host. The navigation logic is inside the
core-navigation
. Each feature module provides UI and business logic. Currently there are 3 features with 1 screen each: Foo, Bar and Debug. Foo screen has only one button that leads to Bar screen. The leak happens inside Bar screen, if you rotate the device twice. It does not happen if you access Bar via Deeplink.