我想实施 safe-args plugin 用于Android导航。
这对整数和字符串很好,但是我无法长时间获得生成的代码。
这可能吗?
我试过:
<fragment android:id="@+id/myFragment" android:name="com.x.app.y.MyFragment" android:label="fragment_mine" tools:layout="@layout/fragment_mine"> <argument android:name="row_id" app:type="long"/> </fragment>
但这会生成字符串的代码。
以下是我的选择:
行为如下:
String
弦
int
ui中的类型列表是导航安全参数当前支持的值的完整列表,因此当前不支持long 1.0.0-alpha01 释放。
1.0.0-alpha01
有一个 existing feature request 添加其他支持的类型,long是请求的类型之一。