Code example for Bundle

Methods: putInt

0
         */ 
        static MyDialogFragment newInstance(int num) {
            MyDialogFragment f = new MyDialogFragment();
 
            // Supply num input as an argument. 
            Bundle args = new Bundle();
            args.putInt("num", num);
            f.setArguments(args);
 
            return f;
        } 
 
        @Override 
        public void onCreate(Bundle savedInstanceState) {
            super.onCreate(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;