Code example for DialogFragment

0
        super(); 
        mRemoveMode = DragSortController.FLING_REMOVE;
    } 
 
    public RemoveModeDialog(int inRemoveMode) {
        super(); 
        mRemoveMode = inRemoveMode;
    } 
 
    public interface RemoveOkListener { 
        public void onRemoveOkClick(int removeMode);
    } 
 
    public void setRemoveOkListener(RemoveOkListener l) {
        mListener = l;
    } 
 
    @Override 
    public Dialog onCreateDialog(Bundle savedInstanceState) {
        AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
        // Set the dialog title