【发布时间】:2020-12-13 21:12:13
【问题描述】:
我有如下功能的导航 xml -
<?xml version="1.0" encoding="utf-8"?>
<navigation xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/navigation_featureB.xml"
app:startDestination="@id/FragmentB">
<fragment
android:id="@+id/FragmentB"
android:name="FragmentB"
android:label="FragmentB">
<deepLink app:uri="App://FragmentB" />
</fragment>
</navigation>
在我的 FeatureA 片段中,我执行以下操作 -
val uri = Uri.parse("App://FragmentB")
findNavController().navigate(uri)
我知道如何在没有深度链接的情况下使用safeArgs。
如何通过深层链接将数据传递给其他功能?
【问题讨论】:
标签: android kotlin android-jetpack android-jetpack-navigation