Status Update
Comments
jb...@google.com <jb...@google.com>
do...@google.com <do...@google.com> #2
I believe I'm having a related problem on certain devices. I set the systemBarBehavior as seen in line below:
WindowInsetsControllerCompat(window, main_container).systemBarsBehavior = WindowInsetsControllerCompat.BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE
Although I'm setting the system bar behavior to BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE
, it seems to be behaving as
BEHAVIOR_SHOW_BARS_BY_TOUCH
on some devices. After i hide the system UI (see fun
below) then touch the screen the bottom system navigation bar appears (the status bar remains hidden). When i swipe down from the top, the system status bar does appear transparent and goes away after a few seconds but the bottom system nav bar remains and isn't transparent.
Bug appears on: Galaxy s9+ (android 10), Galaxy Note 10+ (android 10). Bug does not appear on: Google Pixel 3a (android 11), Google Pixel 3 (android 11). I haven't tested on any other devices besides Galaxy s6 but that phone has hardware buttons so it doesn't apply.
Here's my code to go into full screen mode:
// Hide the app action bar, system status bar and system navigation bar
private fun hideSystemUI() {
supportActionBar?.hide()
WindowCompat.setDecorFitsSystemWindows(window, false)
WindowInsetsControllerCompat(window, main_container).let { controller ->
controller.hide(WindowInsetsCompat.Type.statusBars() or WindowInsetsCompat.Type.navigationBars())
controller.systemBarsBehavior = WindowInsetsControllerCompat.BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE
}
}
cl...@google.com <cl...@google.com> #3
st...@warting.se <st...@warting.se> #4
Bug described above (where any touch on the screen reveals the bottom navigation bar) happens on Xiaomi Redmi Note 9S using Android 10 (MIUI 12) as well.
cl...@google.com <cl...@google.com> #5
st...@warting.se <st...@warting.se> #6
This is more of a missing feature as nobody has implemented the setSystemBarsBehavior
in Impl20
which is the implementation used on pre-30 devices. This shouldn't be such a big deal to implement but it is crucial for correct compat behavior. Please fix this asap!
ap...@google.com <ap...@google.com> #7
cl...@google.com <cl...@google.com> #8
Bug is real on every android 10 device wich i have on all alphas and beta core ctx versions.
pr...@google.com <pr...@google.com> #9
I assumed the old method is implemented since Core is on beta release already, but upon closer inspection the method only implemented for API 30. Revert revert we go...
Description
Version used: 2.8.0-alpha08
If passing an empty string as an safe argument the destination does not exists
@Serializable
object LoginSelector
@Serializable
data class RegisterUser(val email: String)
NavHost(
navController = navController,
startDestination = LoginSelector,
modifier = modifier
) {
composable<LoginSelector> {
Button(onClick = {
navController.navigate(RegisterUser("foo")) // Works!
}) {
Text(text = "Login1")
}
Button(onClick = {
navController.navigate(RegisterUser("")) // Doesn't work. Destination does not exists
}) {
Text(text = "Login2")
}
Button(onClick = {
navController.navigate(RegisterUser(null)) // works if making email nullable
}) {
Text(text = "Login3")
}
}
composable<RegisterUser> { backStackEntry ->
val emailLogin: RegisterUser = backStackEntry.toRoute()
Text(text =emailLogin.email)
}
}