Пример #1
0
        void Configs_ItemClick(object sender, AdapterView.ItemClickEventArgs e)
        {
            var Dialog = new NumberPickerDialogFragment(this, 1, 5, 5, BQ);

            switch (e.Position)
            {
            case 1:
                Dialog = new NumberPickerDialogFragment(this, 1, 5, 5, BQ);
                Dialog.Show(SupportFragmentManager, "change_setting_bq");
                break;

            case 2:
                Dialog = new NumberPickerDialogFragment(this, 1, 5, 5, BA);
                Dialog.Show(SupportFragmentManager, "change_setting_ba");
                break;

            case 4:
                Dialog = new NumberPickerDialogFragment(this, 1, 3, 3, PKD);
                Dialog.Show(SupportFragmentManager, "change_setting_dash_pk");
                break;

            case 5:
                ShowDialog(1);
                break;

            case 7:
                Dialog = new NumberPickerDialogFragment(this, 1, 5, 5, PK);
                Dialog.Show(SupportFragmentManager, "change_setting_pk");
                break;
            }
        }
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            var view = inflater.Inflate(Resource.Layout.DialogFragment_Contents, container, false);

            var datePickerButton = view.FindViewById<Button>(Resource.Id.DatePickerDialogButton);
            datePickerButton.Click += delegate
                                          {
                                              var dialog = new DatePickerDialogFragment(Activity, DateTime.Now, this);
                                              dialog.Show(FragmentManager, "date"); 
                                          };

            var numberPickerButton = view.FindViewById<Button>(Resource.Id.NumberPickerDialogButton);
            numberPickerButton.Click += delegate
                                            {
                                                var dialog = new NumberPickerDialogFragment(Activity, 10, 1337, 42, this);
                                                dialog.Show(FragmentManager, "number"); 
                                            };

            return view;
        }
Пример #3
0
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            var view = inflater.Inflate(Resource.Layout.DialogFragment_Contents, container, false);

            var datePickerButton = view.FindViewById <Button>(Resource.Id.DatePickerDialogButton);

            datePickerButton.Click += delegate
            {
                var dialog = new DatePickerDialogFragment(Activity, DateTime.Now, this);
                dialog.Show(FragmentManager, "date");
            };

            var numberPickerButton = view.FindViewById <Button>(Resource.Id.NumberPickerDialogButton);

            numberPickerButton.Click += delegate
            {
                var dialog = new NumberPickerDialogFragment(Activity, 10, 1337, 42, this);
                dialog.Show(FragmentManager, "number");
            };

            return(view);
        }