show Dialog Fragment - Android User Interface

Android examples for User Interface:Fragment

Description

show Dialog Fragment

Demo Code


import android.os.Handler;
import android.support.v4.app.DialogFragment;
import android.support.v4.app.FragmentManager;

public class Main{
    public static final void showDialogFragment(
            final FragmentManager fragmentManager,
            final DialogFragment dialogFragment, final String tag) {
        Handler handler = HandlerUtils.getHandler();
        handler.post(new Runnable() {
            @Override/*from   ww w.  java 2s .c o  m*/
            public void run() {
                dialogFragment.show(fragmentManager, tag);
            }
        });
    }
}

Related Tutorials