Пример #1
0
        public NewMultiDayView(Context context, Timetable timetable, Day startDay, HourView hourView, TimetableFragment ttf)
            : base(context)
        {
            Timetable         = timetable;
            HourView          = hourView;
            TimetableFragment = ttf;

            _StartDay = startDay;

            ScrollView = new DayScrollView(Context, this);
            AddView(ScrollView);

            TopLayout             = new LinearLayout(context);
            TopLayout.Orientation = Orientation.Horizontal;
            ScrollView.AddView(TopLayout);

            DayList        = new List <Day>();
            DateTitleViews = new List <DateTitleView>();

            onUpdate = (day, events) =>
            {
                /*
                 * Check if new days need to be added to the view
                 * or hourRanges need to be changed
                 */
                CheckHourRange();
            };

            CheckHourRange();
        }
Пример #2
0
        public TimetableView(Context context, Timetable timetable, Day day, TimetableFragment ttf) : base(context)
        {
            Orientation = Orientation.Horizontal;

            hourLayout             = new LinearLayout(context);
            hourLayout.Orientation = Orientation.Vertical;
            AddView(hourLayout);

            /*
             * Deze is er alleen om de uren op de goede plaats te krijgen
             */
            dummyDateView = new DateTitleView(context, null);
            hourLayout.AddView(dummyDateView);

            hourView = new HourView(context, TimeLayout.DefaultStartHour, TimeLayout.DefaultEndHour);
            hourLayout.AddView(hourView);

            dayView = new MultiDayView(context, timetable, day, hourView, ttf);
            hourView.AddHourHeightListener(dayView);
            AddView(dayView);
        }