I don't know how to get it to open a new activity
Call startActivity()
on your Activity
or other Context
, specifying an Intent
identifying the activity that you wish to start.
Note that this is how you start any activity, not just from within this particular event callback method.
Also note that since onSelectedDayChange()
is passed the CalendarView
, you can call getContext()
on the CalendarView
to get a Context
suitable for use in calling startActivity()
, if you like.
What I really want it to do is to open a different activity for each day
There are an indeterminate number of days left in the universe, and you cannot have an indeterminate number of activities. Instead, pass the date to your activity via an Intent
extra, and pick it up in the activity that you start up.