Fixed
Status Update
Comments
il...@google.com <il...@google.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.
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!
il...@google.com <il...@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
Version used: 1.0.0-alpha11
Devices/Android versions reproduced on: irrelevant
<activity <== ACTIVITY AS DESTINATION
android:id="@+id/NewsDetailActivity"
android:name="co.bstorm.navtest.ui.news.newsdetail.NewsDetailActivity"
android:label="activity"
tools:layout="@layout/activity_news_detail">
<argument
android:name="model"
app:argType="co.bstorm.navtest.model.CustomModel[]" /> <== ARRAY OF PARCELABLES AS ARGTYPE
</activity>
When I use Activity as a destination, and have an argument argType as array of Parcelable custom model class, library crashes on destination inside safeArgs generated code when trying to extract the Parcelable array from Bundle:
2019-02-06 13:49:18.523 25348-25348/co.bstorm.navtest E/AndroidRuntime: FATAL EXCEPTION: main
Process: co.bstorm.navtest, PID: 25348
java.lang.RuntimeException: Unable to start activity ComponentInfo{co.bstorm.navtest/co.bstorm.navtest.ui.news.newsdetail.NewsDetailActivity}: java.lang.ClassCastException: android.os.Parcelable[] cannot be cast to co.bstorm.navtest.model.CustomModel[]
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2793)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2864)
at android.app.ActivityThread.-wrap12(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1567)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:156)
at android.app.ActivityThread.main(ActivityThread.java:6523)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:942)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:832)
Caused by: java.lang.ClassCastException: android.os.Parcelable[] cannot be cast to co.bstorm.navtest.model.CustomModel[]
at co.bstorm.navtest.ui.news.newsdetail.NewsDetailActivityArgs$Companion.fromBundle(NewsDetailActivityArgs.kt:25)
at co.bstorm.navtest.ui.news.newsdetail.NewsDetailActivity.onCreate(NewsDetailActivity.kt:13)
at android.app.Activity.performCreate(Activity.java:6915)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1123)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2746)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2864)
at android.app.ActivityThread.-wrap12(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1567)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:156)
at android.app.ActivityThread.main(ActivityThread.java:6523)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:942)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:832)
The exact same setup works properly with the only difference being a Fragment as the destination, instead of activity, which once again flags this as definitely a library bug, and not something on my side.
Sample project:
Instructions:
1. Run app
2. Click on Settings in the upper right
3. App crashes when the destination Activity tries to un-bundle the parcelable array.
There is also a commented out action for the Fragment destination with the same setup which works properly.