WangZhiYao / Comments

Comments of 339.im
0 stars 0 forks source link

使用 Jectpack Navigation 中 SafeArg 的方式向 Activity 与 Fragment 传递数据 - 339 #19

Open WangZhiYao opened 2 years ago

WangZhiYao commented 2 years ago

https://339.im/articles/android-extra-kotlin-delegate/#more

最终使用方式: Activity 中: MainActivity.kt1private val args by activtyArgs<MainActivityArgs>() Fragment 中: MainFragment.kt1private val args by fragmentArgs<MainFragmentArgs>()