public class EventReadAdapter extends EventAsyncAdapter
Modifier and Type | Class and Description |
---|---|
static class |
EventReadAdapter.CalendarInfo
Simple class for holding the minimum information about a calendar.
|
Constructor and Description |
---|
EventReadAdapter(RadCalendarView owner)
Creates a new instance of the
EventReadAdapter class. |
EventReadAdapter(RadCalendarView owner,
List<Event> events)
Creates a new instance of the
EventReadAdapter class. |
Modifier and Type | Method and Description |
---|---|
static EventReadAdapter.CalendarInfo[] |
getAllCalendars(Context context)
Used to retrieve a collection of all the available calendars for the current phone device.
|
static void |
getAllCalendarsAsync(Context context,
GenericResultCallback<EventReadAdapter.CalendarInfo[]> callback)
Used to retrieve a collection of all the available calendars for the current phone device asynchronously.
|
static String |
getCurrentUser(Context context)
Gets the currently logged google account.
|
static void |
getCurrentUserAsync(Context context,
GenericResultCallback<String> callback)
Gets the currently logged google account asynchronously.
|
EventQueryToken |
getEventsQueryToken()
Gets the query tokens that will be used in the query for obtaining the events from the calendar provider.
|
Uri |
getEventsUri()
Gets the current uri that will be used to query the calendar provider.
|
void |
readEventsAsync()
Used to read the events from the calendar provider.
|
void |
setEventsQueryToken(EventQueryToken eventsQueryToken)
Sets the query tokens that will be used in the query for obtaining the events from the calendar provider.
|
void |
setEventsUri(Uri eventsUri)
Sets the current uri that will be used to query the calendar provider.
|
requestEventsForDates
addEvent, getEvents, getEventsForDate, getRenderer, setEvents, setRenderer
public EventReadAdapter(RadCalendarView owner)
EventReadAdapter
class.owner
- the owner of the current adapter instance.public EventReadAdapter(RadCalendarView owner, List<Event> events)
EventReadAdapter
class.owner
- the owner of the current adapter instance.events
- list of events that are not red from the calendar provider.public EventQueryToken getEventsQueryToken()
public void setEventsQueryToken(EventQueryToken eventsQueryToken)
eventsQueryToken
- the new query tokens.public Uri getEventsUri()
public void setEventsUri(Uri eventsUri)
eventsUri
- the new calendar provider uri.public void readEventsAsync()
EventAsyncAdapter
readEventsAsync
in class EventAsyncAdapter
public static EventReadAdapter.CalendarInfo[] getAllCalendars(Context context)
context
- the current context.public static void getAllCalendarsAsync(Context context, GenericResultCallback<EventReadAdapter.CalendarInfo[]> callback)
GenericResultCallback
callback.context
- the current context.callback
- the callback used to carry the result to te caller.public static String getCurrentUser(Context context)
context
- the current context.public static void getCurrentUserAsync(Context context, GenericResultCallback<String> callback)
GenericResultCallback
callback.context
- the current context.callback
- the callback used to carry the result to the caller.