Merge "Method to show DialogFragment allowing state loss." into mnc-dev

This commit is contained in:
Jeff Sharkey
2015-08-14 01:18:18 +00:00
committed by Android (Google) Code Review

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.