Code example for DialogFragment

Methods: setArguments

            MyDialogFragment f = new MyDialogFragment();
            // Supply num input as an argument. 
            Bundle args = new Bundle();
            args.putInt("num", num);
            return f;
        public void onCreate(Bundle savedInstanceState) {
            mNum = getArguments().getInt("num");
            // Pick a style based on the num. 
            int style = DialogFragment.STYLE_NORMAL, theme = 0;
            switch ((mNum-1)%6) {
                case 1: style = DialogFragment.STYLE_NO_TITLE; break;
                case 2: style = DialogFragment.STYLE_NO_FRAME; break;
Connect your IDE to all the code out there  Get Codota for Java