android,为什么popbackstack在删除之前保存当前片段?

时间:2015-02-18 09:40:31

标签: android android-fragments

当我在一个片段上调用popBackStackImmediate()返回上一个片段时,我进入了这个崩溃日志,我想知道为什么Android代码在删除它之前会保存当前片段。它会允许“前进”吗?以后(类似于浏览器行为)?或任何其他原因?

android.view.View.saveHierarchyState(View.java:12679)

由于

java.lang.IndexOutOfBoundsException: setSpan (0 ... -1) has end before start
at android.text.SpannableStringInternal.checkRange(SpannableStringInternal.java:341)
at android.text.SpannableStringInternal.setSpan(SpannableStringInternal.java:77)
at android.text.SpannableString.setSpan(SpannableString.java:46)
at android.text.SpannableStringInternal.<init>(SpannableStringInternal.java:50)
at android.text.SpannableString.<init>(SpannableString.java:30)
at android.widget.TextView.onSaveInstanceState(TextView.java:3505)
at android.view.View.dispatchSaveInstanceState(View.java:12696)
at android.view.ViewGroup.dispatchSaveInstanceState(ViewGroup.java:2615)
at android.view.ViewGroup.dispatchSaveInstanceState(ViewGroup.java:2615)
at android.view.View.saveHierarchyState(View.java:12679)
at android.support.v4.app.FragmentManagerImpl.saveFragmentViewState(FragmentManager.java:1629)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1013)
at android.support.v4.app.FragmentManagerImpl.removeFragment(FragmentManager.java:1223)
at android.support.v4.app.BackStackRecord.popFromBackStack(BackStackRecord.java:901)
at android.support.v4.app.FragmentManagerImpl.popBackStackState(FragmentManager.java:1541)
at android.support.v4.app.FragmentManagerImpl.popBackStackImmediate(FragmentManager.java:502)

0 个答案:

没有答案