Android examples for User Interface:Fragment
dismiss Dialog Fragment
import android.os.Handler; import android.support.v4.app.DialogFragment; import android.support.v4.app.FragmentManager; public class Main{ public static final void dismissDialogFragment( final FragmentManager manager, final String tag) { Handler handler = HandlerUtils.getHandler(); handler.post(new Runnable() { @Override/* ww w.j a va 2s. com*/ public void run() { DialogFragment dialogFragment = (DialogFragment) manager .findFragmentByTag(tag); if (dialogFragment != null) { dialogFragment.dismiss(); } } }); } }