Beispiel #1
0
        public override bool OnOptionsItemSelected(IMenuItem item)
        {
            int itemId = item.ItemId;

            if (itemId == Resource.Id.itemWeek)
            {
                calendarView.ChangeDisplayMode(CalendarDisplayMode.Week, false);
                return(true);
            }
            else if (itemId == Resource.Id.itemMonth)
            {
                calendarView.ChangeDisplayMode(CalendarDisplayMode.Month, false);
                return(true);
            }
            else if (itemId == Resource.Id.itemYear)
            {
                calendarView.ChangeDisplayMode(CalendarDisplayMode.Year, false);
                return(true);
            }
            else if (itemId == Resource.Id.itemDay)
            {
                calendarView.ChangeDisplayMode(CalendarDisplayMode.Day, false);
                return(true);
            }

            return(false);
        }
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            this.calendarView = new RadCalendarView (Activity);
            this.calendarView.GestureManager.SetDoubleTapToChangeDisplayMode (false);
            this.HasOptionsMenu = true;
            /*
             * Setting the display mode with `false` for animation. This way the change
             * will not be visible at the initial state of the calendar.
             */
            calendarView.ChangeDisplayMode(CalendarDisplayMode.Week, false);

            return calendarView;
        }
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            this.calendarView = new RadCalendarView(Activity);
            this.calendarView.GestureManager.SetDoubleTapToChangeDisplayMode(false);
            this.HasOptionsMenu = true;

            /*
             * Setting the display mode with `false` for animation. This way the change
             * will not be visible at the initial state of the calendar.
             */
            calendarView.ChangeDisplayMode(CalendarDisplayMode.Week, false);

            return(calendarView);
        }