示例#1
0
        void KeepMe()
        {
            var txt = new TextView(null);
            txt.Text = txt.Text;

            var iv = new ImageView(null);
            var obj = iv.Drawable;

            var prog = new ProgressBar(null);
            prog.Progress = prog.Progress;

            var cb = new RadioButton(null);
            cb.Checked = cb.Checked;

            var np = new NumberPicker(null);
            np.Value = np.Value;

            var rb = new RatingBar(null);
            rb.Rating = rb.Rating;

            var cv = new CalendarView(null);
            cv.Date = cv.Date;

            var th = new TabHost(null);
            th.CurrentTab = th.CurrentTab;

            var tp = new TimePicker(null);
            tp.CurrentHour = tp.CurrentHour;
            tp.CurrentMinute = tp.CurrentMinute;

            
        }
 private void CalendarView_DateChange(object sender, CalendarView.DateChangeEventArgs e)
 {
     var newDayOfMonth = e.DayOfMonth;
     var newMonth = e.Month;
     var newYear = e.Year;
     //Do logic that needs to be done when date is changed.
 }
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            // Set our view from the "main" layout resource
            SetContentView(Resource.Layout.Main);

            calendarView = FindViewById<CalendarView>(Resource.Id.calendarView1);

            calendarView.DateChange += CalendarView_DateChange;

            var getSelectedDateButton = FindViewById<Button>(Resource.Id.getSelectedDateButton);

            getSelectedDateButton.Click += GetSelectedDateButton_Click;
        }
示例#4
0
 public void OnSelectedDayChange(CalendarView view, int year, int month, int dayOfMonth)
 {
     DateChange.Invoke(view, new DateChangedEventArgs(year, month, dayOfMonth));
 }
示例#5
0
        public override Fragment GetItem(int i)
        {
            var fragment = _tabs[i];
            if (fragment == null)
            {
                MXContainer.Navigate(i == 0 ? ContactListController.Uri : (i == 1 ? CalendarListController.Uri : TaskListController.Uri));
                switch (i)
                {
                    case 0: fragment = new ContactListView(); break;
                    case 1: fragment = new CalendarView(); break;
                    case 2: fragment = new TaskListView(); break;
                };
                _tabs[i] = fragment;
            }

            return fragment;
        }