方法1:
@Parcelizedata
class User(var name: String, val age: Int): Parcelable
@Parcelizeclass
Users: ArrayList<User>(), Parcelable
<argument android:name="users"
app:argType="com.navigation.test.Users"/>
方法二:
since version 1.0.0-alpha08 you can now pass arrays of parcelable objects like this
<argument android:name="users" app:argType="com.navigation.test.User[]"/>
网友评论