本文整理匯總了Java中android.provider.CalendarContract.Events方法的典型用法代碼示例。如果您正苦於以下問題:Java CalendarContract.Events方法的具體用法?Java CalendarContract.Events怎麽用?Java CalendarContract.Events使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類android.provider.CalendarContract
的用法示例。
在下文中一共展示了CalendarContract.Events方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: rows
import android.provider.CalendarContract; //導入方法依賴的package包/類
@NonNull
@Override
public Cursor rows(@NonNull UriParams uriParams, @NonNull Projection<CalendarContract.Events> projection, @NonNull Predicate predicate, @NonNull Optional<String> sorting) throws RemoteException
{
return mDelegate.rows(
uriParams,
projection,
new org.dmfs.android.calendarpal.predicates.CalendarScoped(mCalendarRow, predicate), sorting);
}
示例2: TransientEventsCleanup
import android.provider.CalendarContract; //導入方法依賴的package包/類
public TransientEventsCleanup(@NonNull Table<CalendarContract.Events> eventsTable)
{
// wipe all events without sync sync id which have been deleted
mDelegate = new BulkDelete<>(eventsTable, new AllOf(
new IsNull(CalendarContract.Events.ORIGINAL_SYNC_ID),
new IsNull(CalendarContract.Events._SYNC_ID),
new EqArg(CalendarContract.Events.DELETED, 1)));
}
示例3: addLocalCalendar
import android.provider.CalendarContract; //導入方法依賴的package包/類
public void addLocalCalendar(View view) throws RemoteException, OperationApplicationException
{
if (!ensureCalendarPermissions())
{
return;
}
RowSnapshot<CalendarContract.Calendars> calendar = new VirtualRowSnapshot<>(mCalendars);
// create a table for events of this calendar only
Table<CalendarContract.Events> calendarEvents = new CalendarScoped(calendar, mEvents);
// create a new event rows in the scoped events table
RowSnapshot<CalendarContract.Events> event1 = new VirtualRowSnapshot<>(calendarEvents);
RowSnapshot<CalendarContract.Events> event2 = new VirtualRowSnapshot<>(calendarEvents);
mCalendarQueue.enqueue(
new Seq<>(
// put the calendar
new Put<>(calendar, new Synced(new Visible(new Colored(0x00ff00, new CalendarData("Cal1"))))),
// add event1 now
new Put<>(event1,
new Composite<>(
new Organized("[email protected]"),
new Described("Event Description"),
new Located("Some Location"),
new SingleEventData(
"Event #1",
DateTime.now(),
DateTime.now().addDuration(Duration.parse("PT1H"))))),
// add an attendee to event1
new EventRelated<>(event1, new Insert<>(new Attendees(), new AttendeeData("[email protected]"))),
// add event2 tomorrow same time
new Put<>(event2,
// alternative decoration structure
new Organized("[email protected]",
new Described("Event Description",
new Located("Some Location",
new SingleEventData(
"Event #2",
DateTime.now().addDuration(Duration.parse("P1D")),
DateTime.now().addDuration(Duration.parse("P1DT1H"))))))),
// add an attendee to event2
new EventRelated<>(event2, new Insert<>(new Attendees(), new Named("Me", new AttendeeData("[email protected]")))),
// add a reminder to event2, one day in advance
new EventRelated<>(event2, new Insert<>(new Reminders(), new ReminderData((int) TimeUnit.DAYS.toMinutes(1))))
//new Put<>(new VirtualRowSnapshot<>(calendarEvents), new )
));
mCalendarQueue.flush();
// demonstrate how to update an event which was inserted in the previous transaction
mCalendarQueue.enqueue(
new Seq<>(
// add a reminder to event1 as well
new EventRelated<>(event1, new Insert<>(new Reminders(), new ReminderData((int) TimeUnit.HOURS.toMinutes(1)))),
// update event2 - setting an event color and modifying description
new Put<>(event2, new org.dmfs.android.calendarpal.events.Colored(0x0ff0000, new Described("updated Description")))
));
mCalendarQueue.flush();
}
示例4: Events
import android.provider.CalendarContract; //導入方法依賴的package包/類
public Events()
{
super(new BaseTable<CalendarContract.Events>(CalendarContract.Events.CONTENT_URI));
}
示例5: table
import android.provider.CalendarContract; //導入方法依賴的package包/類
@NonNull
@Override
public Table<CalendarContract.Events> table()
{
return new org.dmfs.android.calendarpal.tables.CalendarScoped(mCalendarRow, mDelegate.table());
}
示例6: Events
import android.provider.CalendarContract; //導入方法依賴的package包/類
public Events(@NonNull ContentProviderClient client)
{
super(new BaseView<CalendarContract.Events>(client, CalendarContract.Events.CONTENT_URI));
}
示例7: assertOperation
import android.provider.CalendarContract; //導入方法依賴的package包/類
@NonNull
@Override
public Operation<CalendarContract.Events> assertOperation(@NonNull UriParams uriParams, @NonNull Predicate predicate)
{
return mDelegate.assertOperation(uriParams, calendarScoped(predicate));
}
示例8: EventRelated
import android.provider.CalendarContract; //導入方法依賴的package包/類
public EventRelated(@NonNull RowSnapshot<CalendarContract.Events> event, @NonNull InsertOperation<T> delegate)
{
mDelegate = new Referring<>(event, "event_id"/* all supported tables use this name as the foreign key column name */, delegate);
}
示例9: CalendarEvent
import android.provider.CalendarContract; //導入方法依賴的package包/類
public CalendarEvent(@NonNull RowSnapshot<CalendarContract.Calendars> calendar, @NonNull Table<CalendarContract.Events> eventsTable)
{
this(calendar, new Insert<>(eventsTable));
}
示例10: reference
import android.provider.CalendarContract; //導入方法依賴的package包/類
@NonNull
@Override
public Optional<SoftRowReference<CalendarContract.Events>> reference()
{
return mDelegate.reference();
}
示例11: Clean
import android.provider.CalendarContract; //導入方法依賴的package包/類
public Clean(@NonNull RowData<CalendarContract.Events> delegate)
{
mDelegate = delegate;
}
示例12: Located
import android.provider.CalendarContract; //導入方法依賴的package包/類
public Located(@Nullable CharSequence location, @NonNull RowData<CalendarContract.Events> delegate)
{
mDelegate = delegate;
mLocation = location;
}
示例13: Organized
import android.provider.CalendarContract; //導入方法依賴的package包/類
public Organized(@NonNull CharSequence organizer, @NonNull RowData<CalendarContract.Events> delegate)
{
mDelegate = delegate;
mOrganizer = organizer;
}
示例14: Described
import android.provider.CalendarContract; //導入方法依賴的package包/類
public Described(@Nullable CharSequence description, @NonNull RowData<CalendarContract.Events> delegate)
{
mDelegate = delegate;
mDescription = description;
}
示例15: Colored
import android.provider.CalendarContract; //導入方法依賴的package包/類
public Colored(int color, @NonNull RowData<CalendarContract.Events> delegate)
{
mDelegate = delegate;
mColor = color;
}