setArguments 出现fragment already active异常

来源:互联网 发布:php交换两个变量的值 编辑:程序博客网 时间:2024/05/17 21:56

布局文件这样写 其实已经commit了, commit 再setArgument报错

<fragment xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/fragment"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    class="com.lin.fragment.PinterestWaterfallProfileFragment" />




commit之后不能在setArguments

最好一次添加完,然后commit,
之前出发让你重新setArguments的地方现在触发重新获取getArguments
0 0
原创粉丝点击