Fixed
Status Update
Comments
il...@google.com <il...@google.com> #2
Hi. Thanks for reporting this. Fixed in alpha-04
th...@gmail.com <th...@gmail.com> #3
Project: platform/frameworks/support
Branch: androidx-main
commit e782987543a9f8ccd485e970ddc74564b24378db
Author: Vighnesh Raut <vighnesh.raut13@gmail.com>
Date: Mon Jan 02 15:27:40 2023
fix: tab row crashes when only 1 tab is added
Bug: b/264018028
Test: Added unit test
Change-Id: I6381dbac304fc1d69d3708c6655f8b595668e93f
M tv/tv-material/src/androidTest/java/androidx/tv/material/TabRowTest.kt
M tv/tv-material/src/main/java/androidx/tv/material/TabRow.kt
https://android-review.googlesource.com/2373449
Branch: androidx-main
commit e782987543a9f8ccd485e970ddc74564b24378db
Author: Vighnesh Raut <vighnesh.raut13@gmail.com>
Date: Mon Jan 02 15:27:40 2023
fix: tab row crashes when only 1 tab is added
Bug:
Test: Added unit test
Change-Id: I6381dbac304fc1d69d3708c6655f8b595668e93f
M tv/tv-material/src/androidTest/java/androidx/tv/material/TabRowTest.kt
M tv/tv-material/src/main/java/androidx/tv/material/TabRow.kt
il...@google.com <il...@google.com> #4
deleted
ap...@google.com <ap...@google.com> #5
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.tv:tv-material:1.0.0-alpha04
ap...@google.com <ap...@google.com> #6
Project: platform/frameworks/support
Branch: androidx-master-dev
commit d5a1c250e6e3471297f64e116a46d1a3a5c9db6c
Author: Ian Lake <ilake@google.com>
Date: Wed Apr 24 15:37:02 2019
Use OnBackPressedCallback in NavController
Replace the brittle OnBackStackChangedListener
with an OnBackPressedCallback registered at the
NavController level which works on all Navigators.
It also helps fix a timing issue where the state
of the FragmentNavigator isn't updated after a Fragment
is popped off the stack, leading to a mismatch in
expected actions available if the newly visible Fragment
calls navigate() in a lifecycle method.
Test: updated tests, new OnBackPressedTest
BUG: 111598096
Change-Id: Id679ea6ac9b238240649656fc0796552d6191757
M navigation/common/api/restricted_2.1.0-alpha03.txt
M navigation/common/api/restricted_current.txt
M navigation/common/src/main/java/androidx/navigation/Navigator.java
M navigation/fragment/src/androidTest/AndroidManifest.xml
M navigation/fragment/src/androidTest/java/androidx/navigation/fragment/FragmentNavigatorTest.kt
A navigation/fragment/src/androidTest/java/androidx/navigation/fragment/OnBackPressedTest.kt
M navigation/fragment/src/androidTest/java/androidx/navigation/fragment/test/EmptyFragment.kt
A navigation/fragment/src/androidTest/java/androidx/navigation/fragment/test/NavigationActivity.kt
A navigation/fragment/src/androidTest/res/navigation/nav_simple.xml
M navigation/fragment/src/main/java/androidx/navigation/fragment/FragmentNavigator.java
M navigation/fragment/src/main/java/androidx/navigation/fragment/NavHostFragment.java
M navigation/runtime/api/2.1.0-alpha03.txt
M navigation/runtime/api/current.txt
M navigation/runtime/build.gradle
M navigation/runtime/src/androidTest/java/androidx/navigation/NavControllerTest.kt
M navigation/runtime/src/main/java/androidx/navigation/NavController.java
M navigation/runtime/src/main/java/androidx/navigation/NavHost.java
https://android-review.googlesource.com/951629
https://goto.google.com/android-sha1/d5a1c250e6e3471297f64e116a46d1a3a5c9db6c
Branch: androidx-master-dev
commit d5a1c250e6e3471297f64e116a46d1a3a5c9db6c
Author: Ian Lake <ilake@google.com>
Date: Wed Apr 24 15:37:02 2019
Use OnBackPressedCallback in NavController
Replace the brittle OnBackStackChangedListener
with an OnBackPressedCallback registered at the
NavController level which works on all Navigators.
It also helps fix a timing issue where the state
of the FragmentNavigator isn't updated after a Fragment
is popped off the stack, leading to a mismatch in
expected actions available if the newly visible Fragment
calls navigate() in a lifecycle method.
Test: updated tests, new OnBackPressedTest
BUG: 111598096
Change-Id: Id679ea6ac9b238240649656fc0796552d6191757
M navigation/common/api/restricted_2.1.0-alpha03.txt
M navigation/common/api/restricted_current.txt
M navigation/common/src/main/java/androidx/navigation/Navigator.java
M navigation/fragment/src/androidTest/AndroidManifest.xml
M navigation/fragment/src/androidTest/java/androidx/navigation/fragment/FragmentNavigatorTest.kt
A navigation/fragment/src/androidTest/java/androidx/navigation/fragment/OnBackPressedTest.kt
M navigation/fragment/src/androidTest/java/androidx/navigation/fragment/test/EmptyFragment.kt
A navigation/fragment/src/androidTest/java/androidx/navigation/fragment/test/NavigationActivity.kt
A navigation/fragment/src/androidTest/res/navigation/nav_simple.xml
M navigation/fragment/src/main/java/androidx/navigation/fragment/FragmentNavigator.java
M navigation/fragment/src/main/java/androidx/navigation/fragment/NavHostFragment.java
M navigation/runtime/api/2.1.0-alpha03.txt
M navigation/runtime/api/current.txt
M navigation/runtime/build.gradle
M navigation/runtime/src/androidTest/java/androidx/navigation/NavControllerTest.kt
M navigation/runtime/src/main/java/androidx/navigation/NavController.java
M navigation/runtime/src/main/java/androidx/navigation/NavHost.java
il...@google.com <il...@google.com> #7
NavController now offers new APIs to hook up to an OnBackPressedDispatcher: https://developer.android.com/guide/navigation/navigation-custom-back
Which allows NavController to intercept the back button before the FragmentManager, ensuring that we update our state before going through Lifecycle events and fixing this edge case.
This behavior is enabled by default if you're using NavHostFragment, but custom NavHosts can call through to this same API for their own Navigators and not try to intercept the back button themselves.
Which allows NavController to intercept the back button before the FragmentManager, ensuring that we update our state before going through Lifecycle events and fixing this edge case.
This behavior is enabled by default if you're using NavHostFragment, but custom NavHosts can call through to this same API for their own Navigators and not try to intercept the back button themselves.
il...@google.com <il...@google.com> #8
This will be available in Navigation 2.1.0-alpha03.
Description
Version used: 1.0.0-alpha03
Devices/Android versions reproduced on: All
Trying to navigate in onResume of a fragment is causing a crash if the fragment was popped to.
The attached project consists of three fragments: A, B, C.
A is the home fragment and has conditional navigation to B. The conditional navigation will be triggered when the app is started, and after fragment C has been shown.
When navigating to B from A at app start there are no issues. Going back to A, then tapping the button to navigate to C, and then going back will trigger the conditional navigation again and cause a crash.
Same problem exists in alpha02.