Fixed
Status Update
Comments
co...@gmail.com <co...@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>
jb...@google.com <jb...@google.com>
il...@google.com <il...@google.com>
cl...@google.com <cl...@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!
co...@gmail.com <co...@gmail.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
cl...@google.com <cl...@google.com> #5
Horizontal ViewPager2 not correctly working into a vertical RecyclerView
Set a setNestedScrollingEnabled to the RecyclerView into the ViewPager2 (across reflection) resolves the problem
Set a setNestedScrollingEnabled to the RecyclerView into the ViewPager2 (across reflection) resolves the problem
il...@google.com <il...@google.com> #6
ageevvalentin@gmail.com, could you provide a sample app? I'd like to learn more about the circumstances that cause the problem; putting a clean ViewPager2 inside a clean RecyclerView seems to work fine, so there must be other factors involved.
na...@google.com <na...@google.com> #7
Added a patch for androidx-master-dev that demos a horizontal ViewPager2 inside a vertical RecyclerView.
Verified that it works correctly on a:
- Nexus 4 emulator with API 17
- Nexus 5X emulator with API 28
- Pixel 2 device with API 29
To reproduce:
- Check out the Android Jetpack source (at commit 256899f482ff85cddfb050f37550be7b5ec927ef) (see steps in [1])
- Apply the patch (`git apply 0001-Add-sample-where-a-horizontal-ViewPager2-is-nested-i.patch`)
- Build and install viewpager2's integration-tests app: `./gradlew viewpager2:integration-tests:testapp:installDebug`
- Run it
Closing the issue for now, but please reopen if you have a minimal reproduction app
[1]https://android.googlesource.com/platform/frameworks/support/+/256899f482ff85cddfb050f37550be7b5ec927ef
Verified that it works correctly on a:
- Nexus 4 emulator with API 17
- Nexus 5X emulator with API 28
- Pixel 2 device with API 29
To reproduce:
- Check out the Android Jetpack source (at commit 256899f482ff85cddfb050f37550be7b5ec927ef) (see steps in [1])
- Apply the patch (`git apply 0001-Add-sample-where-a-horizontal-ViewPager2-is-nested-i.patch`)
- Build and install viewpager2's integration-tests app: `./gradlew viewpager2:integration-tests:testapp:installDebug`
- Run it
Closing the issue for now, but please reopen if you have a minimal reproduction app
[1]
Description
In order navigate using "NavDirection" directly created from a ViewModel would it be possible to pass R.string.id as argument?
Imagine a case where multiple errors leads you to a fragment that differs only by its text. Same behavior inside but only information change sightly. You would try to re-use that common part and avoid duplication.
If you try to generate a direction from your ViewModel with argument you won't be able to retrieve context assosiated string to fill the label. So would it be possible to parse a dynamic label's id instead of applying a toString() on it?
Currently if I send a NavDirection with an argument in it which is also {label} it will just apply a toString() and show id in place of toolbar title. Expected is the localised string as title to not resolve it using getString by myself (in a fragment, before or after navigation)
Some snippets from the way I would otherwise do it.
Current work around would be to create one destination per string_id reusing the same fragment "name" attribute and duplicate actions.
This would also remove the need of "getString()" logic from fragment or hook the "onDestinationChanged" as suggested some places just to update a title.