Code example for Bundle

Methods: putInt

        static MyDialogFragment newInstance(int num) {
            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) {
Stop searching for code, let great code find you!  Add Codota to your java IDE