use of android.support.v4.app.DialogFragment in project SeriesGuide by UweTrottmann.
the class AddListDialogFragment method showAddListDialog.
/**
* Display a dialog which allows to edit the title of this list or remove it.
*/
public static void showAddListDialog(FragmentManager fm) {
// 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 = fm.beginTransaction();
Fragment prev = fm.findFragmentByTag("addlistdialog");
if (prev != null) {
ft.remove(prev);
}
ft.addToBackStack(null);
// Create and show the dialog.
DialogFragment newFragment = AddListDialogFragment.newInstance();
newFragment.show(ft, "addlistdialog");
}
use of android.support.v4.app.DialogFragment in project material-dialogs by afollestad.
the class ColorChooserDialog method dismissIfNecessary.
private void dismissIfNecessary(AppCompatActivity context, String tag) {
Fragment frag = context.getSupportFragmentManager().findFragmentByTag(tag);
if (frag != null) {
((DialogFragment) frag).dismiss();
context.getSupportFragmentManager().beginTransaction().remove(frag).commit();
}
}
use of android.support.v4.app.DialogFragment in project material-dialogs by afollestad.
the class FileChooserDialog method show.
public void show(FragmentActivity context) {
final String tag = getBuilder().tag;
Fragment frag = context.getSupportFragmentManager().findFragmentByTag(tag);
if (frag != null) {
((DialogFragment) frag).dismiss();
context.getSupportFragmentManager().beginTransaction().remove(frag).commit();
}
show(context.getSupportFragmentManager(), tag);
}
use of android.support.v4.app.DialogFragment in project barcodescanner by dm77.
the class FullScannerActivity method showMessageDialog.
public void showMessageDialog(String message) {
DialogFragment fragment = MessageDialogFragment.newInstance("Scan Results", message, this);
fragment.show(getSupportFragmentManager(), "scan_results");
}
use of android.support.v4.app.DialogFragment in project barcodescanner by dm77.
the class FullScannerActivity method closeDialog.
public void closeDialog(String dialogName) {
FragmentManager fragmentManager = getSupportFragmentManager();
DialogFragment fragment = (DialogFragment) fragmentManager.findFragmentByTag(dialogName);
if (fragment != null) {
fragment.dismiss();
}
}
Aggregations