我在我的项目中使用单个活动结构,并且我想使用导航组件处理深度(应用程序)链接。一切都很好,但我无法处理数组查询参数。我想将complex_types作为字符串数组。
现有网址:
my.example.com/?guests=1&complex_types=hotel&complex_types=motel
nav_graph.xml:
<fragment
android:id="@+id/complexFragment"
android:name="com.the.example.packagename.ComplexFragment"
android:label="ComplexFragment">
<argument
android:name="guests"
android:defaultValue="1"
app:argType="integer" />
<argument
android:name="complexFilters"
app:argType="???" />
<deepLink
android:id="@+id/deepLink_complex_fragment"
app:uri="my.example.com/?guests={guests}&complex_types={complexFilters}" />
</fragment>
我不知道必须使用什么类型的 argType 而不是??? 在complexFilters参数中。