Fix issue: Fix FragmentTransaction IllegalStateException
Allowing fragment to loose its state if fragment onSaveInstanceState
function has been called on transaction commit time.
https://developer.android.com/reference/android/app/FragmentTransaction.html#commit()
@@ -152,7 +152,7 @@ public class UiUtil {
final Fragment fragment = fragmentManager.findFragmentByTag(tag);
if (fragment != null) {
fragmentManager.beginTransaction().remove(fragment)
- .commit();
+ .commitAllowingStateLoss();
}
}
}
