android - How do I design my own custom schedule calendar? -
an event object stores usertask object
, int scheduledtime
, , boolean[] daysofweektorepeat
denoting days of week when should repeated.
these event objects inserted sparse array
list<arraylist<event>> calendareventsmatrix.
the structure has been tried , tested, works. next step design ui allows user see events on calendar. user can click on events , add, edit, or delete events.
here current design plan:
- create eventslot.class extends linearlayout. basis entire calendar. each eventslot view have own onclicklistener.
- create weekcolumn.class extends linearlayout. weekcolumn vertical linearlayout fill bunch of eventslot views somehow numbered every hour of day.
- create eventsframe.class extend linearlayout. eventsframe horizontal linearlayout fill 7 of these weekcolumn views (one every day of week).
- create calendarframe.class extend viewgroup. container eventsframe, other useful textviews , labels. calendarframe inflated , placed fragment.
assuming of has been set up, next step assign events in calendareventsmatrix calendar adapter.
is thinking correct?
my concern don't want inflating whole bunch of these views every single time user wants open schedule calendar. should doing things xml or dynamically? , best adapter extend calendar?
Comments
Post a Comment