From 063f850060bb28bc9984c352c0cbf8f13a00789d Mon Sep 17 00:00:00 2001 From: Jeff Sharkey Date: Thu, 13 Aug 2015 16:57:29 -0700 Subject: Method to show DialogFragment allowing state loss. Same as show(), but allowing state loss. Bug: 22867250 Change-Id: Ib779d8a3febc70ad47a9c1a9099d858707bad733 --- core/java/android/app/DialogFragment.java | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'core/java/android') diff --git a/core/java/android/app/DialogFragment.java b/core/java/android/app/DialogFragment.java index 2fb8cc2..9caf752 100644 --- a/core/java/android/app/DialogFragment.java +++ b/core/java/android/app/DialogFragment.java @@ -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. -- cgit v1.1