How to pass object of type Parcelable to a Fragment using Navigation type safeargs plugin

Since safe-args-gradle-plugin:1.0.0-alpha03 you can use Parcelable objects by using their fully qualified class name:

<argument
    android:name="item"
    app:argType="com.example.app.model.Item"/>

Parcelable arguments are now supported, using a fully qualified class name for app:type. The only default value supported is “@null” (https://issuetracker.google.com/issues/79563966)

Source: https://developer.android.com/jetpack/docs/release-notes


To support nullability one has to use android:defaultValue="@null" with app:nullable="true".

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)