Fixed
Status Update
Comments
jb...@google.com <jb...@google.com>
ap...@google.com <ap...@google.com> #2
Hi. Thanks for reporting this. Fixed in alpha-04
cl...@google.com <cl...@google.com>
ap...@google.com <ap...@google.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
ap...@google.com <ap...@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
cl...@google.com <cl...@google.com> #6
Added built-in support of the following nullable primitives
Int?, Boolean?, Float?, Long?
These primitives will no longer require custom NavTypes.
Note that this support only applies to safe args in Kotlin DSL
. XML-based navigation will continue to only support non-nullable primitives.
Will be available in the navigation release on Aug 7th
.
ap...@google.com <ap...@google.com> #7
Project: platform/frameworks/support
Branch: androidx-main
commit 3cba58164e32afa04d092ba3b4ab8dc326451290
Author: Clara Fok <clarafok@google.com>
Date: Wed Jul 24 17:10:19 2024
Add support for nullable Enums in safe args
Refactored helper function `parseSerializableOrParcelableType` to take a `clazz: Class<*>` instead of `className: String` so that it can be better reused by NavTypeConverter.
Test: ./gradlew navigation:navigation-common:test
Test: ./gradlew navigation:navigation-common:cC
Test: ./gradlew navigation:navigation-runtime:cC
Bug: 351994237
Relnote: "Navigation in safe args has added built-in support for argumnets of type `Enum<*>?`."
Change-Id: Ide076fd4f77daf8373d71e093f833920aba9b911
M navigation/navigation-common/src/androidTest/java/androidx/navigation/serialization/RouteFilledTest.kt
M navigation/navigation-common/src/main/java/androidx/navigation/NavType.kt
M navigation/navigation-common/src/main/java/androidx/navigation/serialization/NavTypeConverter.kt
M navigation/navigation-common/src/test/java/androidx/navigation/serialization/NavArgumentGeneratorTest.kt
M navigation/navigation-runtime/src/androidTest/java/androidx/navigation/NavControllerRouteTest.kt
https://android-review.googlesource.com/3195076
Branch: androidx-main
commit 3cba58164e32afa04d092ba3b4ab8dc326451290
Author: Clara Fok <clarafok@google.com>
Date: Wed Jul 24 17:10:19 2024
Add support for nullable Enums in safe args
Refactored helper function `parseSerializableOrParcelableType` to take a `clazz: Class<*>` instead of `className: String` so that it can be better reused by NavTypeConverter.
Test: ./gradlew navigation:navigation-common:test
Test: ./gradlew navigation:navigation-common:cC
Test: ./gradlew navigation:navigation-runtime:cC
Bug: 351994237
Relnote: "Navigation in safe args has added built-in support for argumnets of type `Enum<*>?`."
Change-Id: Ide076fd4f77daf8373d71e093f833920aba9b911
M navigation/navigation-common/src/androidTest/java/androidx/navigation/serialization/RouteFilledTest.kt
M navigation/navigation-common/src/main/java/androidx/navigation/NavType.kt
M navigation/navigation-common/src/main/java/androidx/navigation/serialization/NavTypeConverter.kt
M navigation/navigation-common/src/test/java/androidx/navigation/serialization/NavArgumentGeneratorTest.kt
M navigation/navigation-runtime/src/androidTest/java/androidx/navigation/NavControllerRouteTest.kt
pr...@google.com <pr...@google.com> #8
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.navigation:navigation-common:2.8.0-beta07
androidx.navigation:navigation-runtime:2.8.0-beta07
Description
Component used: Navigation Version used: 2.8.0-beta03 Devices/Android versions reproduced on:
Simply make a class with a nullable primitive like an Int?
@Serializable data class ExampleRoute(val accountMethod: Int?)
and runtime crash:
In the IDE, there is no indication this is wrong, and is perfectly valid in Kotlinx serialization. I understand complex types requiring a barrier, but a nullable primitive seems logical in kotlin. A lint warning or error would be also highly helpful to prevent this from potentially crashing at runtime.