public static MyAlertDialogFragment newInstance(int dialogID, int poistion) { MyAlertDialogFragment dialogFragment = new MyAlertDialogFragment(); Bundle bundle = new Bundle(); bundle.putInt(OP_ID, dialogID); bundle.putInt(POSITION, poistion); dialogFragment.setArguments(bundle); return dialogFragment; }