Android中使Navigation传递集合

 将集合通过Bundle传递
val bundle = Bundle()
Navigation.findNavController(binding.root).navigate(R.id.actionShowDeviceAddFromAutoDetection,bundle)

  动作Id:

actionShowDeviceAddFromAutoDetection
<action
            android:id="@+id/actionShowDeviceAddFromAutoDetection"
            app:destination="@id/deviceAddFragment"
            app:popUpTo="@id/mainFragment"
            app:popUpToInclusive="false"
            app:enterAnim="@anim/nav_default_enter_anim"
            app:exitAnim="@anim/nav_default_exit_anim"
            app:popEnterAnim="@anim/nav_default_pop_enter_anim"
            app:popExitAnim="@anim/nav_default_pop_exit_anim" />

  

上一篇:码牛学院Android移动互联网高级开发正式课


下一篇:No provider available from registry for service com.xxx.TestService:1.0.0 on consumer use dubbo ve