Method to show DialogFragment allowing state loss.

Same as show(), but allowing state loss.

Bug: 22867250
Change-Id: Ib779d8a3febc70ad47a9c1a9099d858707bad733
This commit is contained in:
Jeff Sharkey
2015-08-13 16:57:29 -07:00
parent 9d14206594
commit 063f850060

View File

@@ -230,6 +230,15 @@ public class DialogFragment extends Fragment
ft.commit();
}
/** {@hide} */
public void showAllowingStateLoss(FragmentManager manager, String tag) {
mDismissed = false;
mShownByMe = true;
FragmentTransaction ft = manager.beginTransaction();
ft.add(this, tag);
ft.commitAllowingStateLoss();
}
/**
* Display the dialog, adding the fragment using an existing transaction
* and then committing the transaction.