Code example for DialogFragment

0
        super(); 
        mDragInitMode = DragSortController.ON_DOWN;
    } 
 
    public DragInitModeDialog(int dragStartMode) {
        super(); 
        mDragInitMode = dragStartMode;
    } 
 
    public interface DragOkListener { 
        public void onDragOkClick(int removeMode);
    } 
 
    public void setDragOkListener(DragOkListener l) {
        mListener = l;
    } 
 
    @Override 
    public Dialog onCreateDialog(Bundle savedInstanceState) {
        AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
        // Set the dialog title