List of usage examples for android.support.v4.app.support DialogFragment show
public int show(FragmentTransaction transaction, String tag)
From source file:com.github.preferencefragment.app.FragmentAlertDialog.java
void showDialog() { DialogFragment newFragment = MyAlertDialogFragment.newInstance(R.string.alert_dialog_two_buttons_title); newFragment.show(getSupportFragmentManager(), "dialog"); }
From source file:com.github.preferencefragment.app.FragmentDialog.java
void showDialog() { mStackLevel++;// w w w . j a v a 2s .c o m // DialogFragment.show() will take care of adding the fragment // in a transaction. We also want to remove any currently showing // dialog, so make our own transaction and take care of that here. FragmentTransaction ft = getSupportFragmentManager().beginTransaction(); Fragment prev = getSupportFragmentManager().findFragmentByTag("dialog"); if (prev != null) { ft.remove(prev); } ft.addToBackStack(null); // Create and show the dialog. DialogFragment newFragment = MyDialogFragment.newInstance(mStackLevel); newFragment.show(ft, "dialog"); }