Fixed
Status Update
Comments
il...@google.com <il...@google.com>
il...@google.com <il...@google.com>
ap...@google.com <ap...@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.
cl...@google.com <cl...@google.com> #3
Hi!
What is 'partially' exactly?
How do I see it?
Thanks!
What is 'partially' exactly?
How do I see it?
Thanks!
st...@gmail.com <st...@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
na...@google.com <na...@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
Description
Component used: Navigation Version used: 2.4 Devices/Android versions reproduced on: all
AppCompatActivity::setupActionBarWithNavController
can be called to automatically update app bar content when navigation destination changes. In particular,setupActionBarWithNavController
promises to automatically hide the Up arrow for "top-level" destinations and show the Up arrow for all other destinations. To achieve this,setupActionBarWithNavController
needs to infer or be told which destinations are "top-level".When using a
BottomNavigationView
, I wantedI tried calling
setupActionBarWithNavController
and passing a customAppBarConfiguration
constructed using theMenu
instance from theBottomNavigationView
:Unfortunately, when passed a
Menu
whose entries correspond to navigation graph IDs,AppBarConfiguration::Builder
sets the graph IDs as top-level destination IDs, rather than the setting the graph start destination IDs as top-level destination IDs. The result is that theAbstractAppBarOnDestinationChangedListener
applied bysetupActionBarWithNavController
mistakenly classifies every destination as top-level and no screens have an Up arrow.This can be worked around by explicitly passing the IDs of the start destinations of each tab's graph when constructing the
AppBarConfiguration
builder:However, the behavior of
AppBarConfiguration.Builder(Menu)
remains surprising and it would be good to investigate whether that constructor could be made to behave as I anticipated!Android Study Group Slack thread:https://androidstudygroup.slack.com/archives/CAZCL8AVB/p1656470310000929?thread_ts=1655997032.467509&cid=CAZCL8AVB