Fixed
Status Update
Comments
il...@google.com <il...@google.com>
al...@gmail.com <al...@gmail.com> #2
I hope Parcelable and Serializable objects support will be added too.
jo...@gmail.com <jo...@gmail.com> #3
I second the comment about Parcelable.
vy...@gmail.com <vy...@gmail.com> #4
1+.
Also, I'm an Kotlin noob. What would be a "reference" in this case?
Also, I'm an Kotlin noob. What would be a "reference" in this case?
il...@google.com <il...@google.com> #5
Re #4 - an argument with a type of "reference" is a reference to an Android resource - i.e., with values like @string/value in XML or R.string.value in code.
vy...@gmail.com <vy...@gmail.com> #6
Re #5
Ooohhh...
Yeah, that is what I was thinking but I wasn't sure.
Thanks.
Ooohhh...
Yeah, that is what I was thinking but I wasn't sure.
Thanks.
wk...@google.com <wk...@google.com>
wk...@google.com <wk...@google.com>
wk...@google.com <wk...@google.com> #7
Long and Boolean support will be coming in a future release.
I'll re-open this for the remaining requests for Parcelable and Serializable.
I'll re-open this for the remaining requests for Parcelable and Serializable.
wk...@google.com <wk...@google.com>
il...@google.com <il...@google.com> #8
Parcelable support has been added and will also be available in alpha03. The only defaultValue available will be @null (indicating a null value).
We strongly recommend using Parcelable over Serializable and won't be supporting Serializable in alpha03. We'll be tracking the additional feature request for Serializable over inhttps://issuetracker.google.com/issues/111316353
We strongly recommend using Parcelable over Serializable and won't be supporting Serializable in alpha03. We'll be tracking the additional feature request for Serializable over in
do...@arctouch.com <do...@arctouch.com> #9
I'm doing this:
<argument
android:name="latitude"
app:argType="Double"
android:defaultValue="@null"
app:nullable="true" />
And getting this error:
Caused by: java.lang.ClassNotFoundException:Double
What about Double?
<argument
android:name="latitude"
app:argType="Double"
android:defaultValue="@null"
app:nullable="true" />
And getting this error:
Caused by: java.lang.ClassNotFoundException:Double
What about Double?
il...@google.com <il...@google.com> #10
Doubles are not a supported format for Android XML values. You can use argType="float"
gv...@gmail.com <gv...@gmail.com> #11
I found out that it possible to use wrappers like this: (in release 1.0.0!)
<argument
android:name="amount"
app:argType="java.lang.Double" />
Why not use Serializable in that case?
<argument
android:name="amount"
app:argType="java.lang.Double" />
Why not use Serializable in that case?
ju...@hotmail.com <ju...@hotmail.com> #12
LocalDate is Serializable, so Im trying to use it with
app:argType="java.time.LocalDate"
and its giving me an error:
Caused by: java.lang.RuntimeException: java.lang.ClassNotFoundException: java.time.LocalDate
at androidx.navigation.NavType.fromArgType(NavType.java:181)
at androidx.navigation.NavInflater.inflateArgument(NavInflater.java:191)
Im using desugaring so ... may that be the reason??
app:argType="java.time.LocalDate"
and its giving me an error:
Caused by: java.lang.RuntimeException: java.lang.ClassNotFoundException: java.time.LocalDate
at androidx.navigation.NavType.fromArgType(NavType.java:181)
at androidx.navigation.NavInflater.inflateArgument(NavInflater.java:191)
Im using desugaring so ... may that be the reason??
il...@google.com <il...@google.com> #13
Re #12 - please star
Description
Version used: 1.0.0-alpha01
Devices/Android versions reproduced on: N/A
When specifying arguments for and a navigation action, there are only 4 options: "inferred, string, integer, reference"
Some arguments in my app use Boolean and Long and SafeArgs seem to only support "string" or "integer" (even if I manually put app:type="long"... it does not know what "long" is and falls back to "string")
Please add support for more types... especially Long and Boolean (you can "put" a lot more types into a Bundle)
I know I can manually add args to a bundle and then navigate... but I really want to use Directions from SafeArgs