I want to use Parcelable with the Navigation Components and Safe Args in version 1.0.0-alpha07
. Although since alpha 03 Parcelable should be supported by Safe Args, but I'm not able to use them. The only way to use it is with app:argType="android.os.Parcelable"
which doesn't seem like the right way for me.
If I use only app:argType="Parcelable"
there is no import generated in the generated classes.
Therefore what's the right way to use Parcelable with Safe Args?
You need Android Studio 3.3 and above. Create parcelable object, then go to navigation editor, select destination for which you want to create argument. Then click on add icon on arguments section on the right:
Then select custom parcelable from drop down list:
And choose your parcelable class: