示例#1
0
        public override View GetItem(int index, View cachedView, ViewGroup parent, int currentItemIdx)
        {
            int      day         = index;
            Calendar newCalendar = (Calendar)_calendar.Clone();

            newCalendar.Roll(CalendarField.DayOfYear, day);

            View view = base.GetItem(index, cachedView, parent, currentItemIdx);

            TextView monthday = (TextView)view.FindViewById(Resource.Id.time2_monthday);

            if (day == 0)
            {
                monthday.Text = "Today";
            }
            else
            {
                monthday.Text = newCalendar.Time.Time.ToDateTime().ToString("ddd dd MMMM", CultureInfo.CurrentUICulture);
            }

            view.Tag = newCalendar.Time.Time.ToDateTime().ToShortDateString();

            return(view);
        }