Observed on v1.14.0 on a Google Pixel Pro running QPR2 Beta 4. Also happens in the emulator running Android 17 API 37.1 and 37.2
See this issue report on the Android beta tracker (post 7) for more details and a video showing the issue in my app.
The problem is that a MaterialToolBar child of an AppBarLayout with app:layout_scrollFlags="scroll" (possibly combined with other flags but only scroll is important), always auto-scrolls when a BottomNavigationView (see video) that uses fragments within a ViewPager2 for its tabs, switches tabs (ViewPager#setCurrentItem).
It results in unwanted scrolling of the MaterialToolBar when switching tabs This issue does not happen on regular Android 17 and below. It started to happen in an early Android 17 QPR beta version a few months ago.
It is hugely annoying and the only work-around I found for now is to disable "scroll" on the MaterialToolBar if the app is running on Android 17 QPR:
if(Misc.isAndroid17_1_OrLater()) {
((AppBarLayout.LayoutParams) _toolbar.getLayoutParams()).setScrollFlags(0);
}
Normally, the MaterialToolBar scrolls up (hides) when use scrolls the content, but this workaround disable it.
Mind you, the YouTube app is also affected (the issue report linked above was initially for the YT app).
Would be awesome if it could be looked into.
Observed on v1.14.0 on a Google Pixel Pro running QPR2 Beta 4. Also happens in the emulator running Android 17 API 37.1 and 37.2
See this issue report on the Android beta tracker (post 7) for more details and a video showing the issue in my app.
The problem is that a
MaterialToolBarchild of anAppBarLayoutwithapp:layout_scrollFlags="scroll"(possibly combined with other flags but onlyscrollis important), always auto-scrolls when aBottomNavigationView(see video) that uses fragments within aViewPager2for its tabs, switches tabs (ViewPager#setCurrentItem).It results in unwanted scrolling of the
MaterialToolBarwhen switching tabs This issue does not happen on regular Android 17 and below. It started to happen in an early Android 17 QPR beta version a few months ago.It is hugely annoying and the only work-around I found for now is to disable "scroll" on the
MaterialToolBarif the app is running on Android 17 QPR:Normally, the
MaterialToolBarscrolls up (hides) when use scrolls the content, but this workaround disable it.Mind you, the YouTube app is also affected (the issue report linked above was initially for the YT app).
Would be awesome if it could be looked into.