Ejemplo n.º 1
0
        private void SetupPicker(EditText textView, string format, string title = "")
        {
            int dcount = 0;

            if (format == Constants.PICKER_TIME)
            {
                dcount = 3;
            }
            else if (format == Constants.PICKER_PACE || format == Constants.PICKER_HR)
            {
                dcount = 2;
            }
            else
            {
                dcount = 1;
            }

            textView.Touch += (object sender, View.TouchEventArgs e) =>
            {
                if (e.Event.Action == MotionEventActions.Down)
                {
                    TimeFormatDialog myDiag = TimeFormatDialog.newInstance((EditText)sender, dcount, format, title);
                    myDiag.Show(FragmentManager, "Diag");
                }
            };
        }
Ejemplo n.º 2
0
 private void SetupAdjustPicker(EditText textView, SeekBar seekBar, int maxValue)
 {
     textView.Touch += (object sender, View.TouchEventArgs e) =>
     {
         if (e.Event.Action == MotionEventActions.Down)
         {
             TimeFormatDialog myDiag = TimeFormatDialog.newInstance((EditText)sender, 1, "adjust", "");
             myDiag.Show(FragmentManager, "Diag");
         }
     };
 }
Ejemplo n.º 3
0
        public static TimeFormatDialog newInstance(EditText textView, int numDials, string type, string title)
        {
            TimeFormatDialog numdialog = new TimeFormatDialog();

            numdialog.textView = textView;
            numdialog.type     = type;
            numdialog.title    = title;
            Bundle args = new Bundle();

            args.PutInt(ARG_numDials, numDials);
            numdialog.Arguments = args;
            return(numdialog);
        }