当前位置: 首页>>代码示例>>Java>>正文


Java CalendarContract.Events方法代码示例

本文整理汇总了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);
}
 
开发者ID:dmfs,项目名称:ContentPal,代码行数:10,代码来源:CalendarScoped.java

示例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)));
}
 
开发者ID:dmfs,项目名称:ContentPal,代码行数:9,代码来源:TransientEventsCleanup.java

示例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();
}
 
开发者ID:dmfs,项目名称:ContentPal,代码行数:64,代码来源:DemoActivity.java

示例4: Events

import android.provider.CalendarContract; //导入方法依赖的package包/类
public Events()
{
    super(new BaseTable<CalendarContract.Events>(CalendarContract.Events.CONTENT_URI));
}
 
开发者ID:dmfs,项目名称:ContentPal,代码行数:5,代码来源:Events.java

示例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());
}
 
开发者ID:dmfs,项目名称:ContentPal,代码行数:7,代码来源:CalendarScoped.java

示例6: Events

import android.provider.CalendarContract; //导入方法依赖的package包/类
public Events(@NonNull ContentProviderClient client)
{
    super(new BaseView<CalendarContract.Events>(client, CalendarContract.Events.CONTENT_URI));
}
 
开发者ID:dmfs,项目名称:ContentPal,代码行数:5,代码来源:Events.java

示例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));
}
 
开发者ID:dmfs,项目名称:ContentPal,代码行数:7,代码来源:CalendarScoped.java

示例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);
}
 
开发者ID:dmfs,项目名称:ContentPal,代码行数:5,代码来源:EventRelated.java

示例9: CalendarEvent

import android.provider.CalendarContract; //导入方法依赖的package包/类
public CalendarEvent(@NonNull RowSnapshot<CalendarContract.Calendars> calendar, @NonNull Table<CalendarContract.Events> eventsTable)
{
    this(calendar, new Insert<>(eventsTable));
}
 
开发者ID:dmfs,项目名称:ContentPal,代码行数:5,代码来源:CalendarEvent.java

示例10: reference

import android.provider.CalendarContract; //导入方法依赖的package包/类
@NonNull
@Override
public Optional<SoftRowReference<CalendarContract.Events>> reference()
{
    return mDelegate.reference();
}
 
开发者ID:dmfs,项目名称:ContentPal,代码行数:7,代码来源:CalendarEvent.java

示例11: Clean

import android.provider.CalendarContract; //导入方法依赖的package包/类
public Clean(@NonNull RowData<CalendarContract.Events> delegate)
{
    mDelegate = delegate;
}
 
开发者ID:dmfs,项目名称:ContentPal,代码行数:5,代码来源:Clean.java

示例12: Located

import android.provider.CalendarContract; //导入方法依赖的package包/类
public Located(@Nullable CharSequence location, @NonNull RowData<CalendarContract.Events> delegate)
{
    mDelegate = delegate;
    mLocation = location;
}
 
开发者ID:dmfs,项目名称:ContentPal,代码行数:6,代码来源:Located.java

示例13: Organized

import android.provider.CalendarContract; //导入方法依赖的package包/类
public Organized(@NonNull CharSequence organizer, @NonNull RowData<CalendarContract.Events> delegate)
{
    mDelegate = delegate;
    mOrganizer = organizer;
}
 
开发者ID:dmfs,项目名称:ContentPal,代码行数:6,代码来源:Organized.java

示例14: Described

import android.provider.CalendarContract; //导入方法依赖的package包/类
public Described(@Nullable CharSequence description, @NonNull RowData<CalendarContract.Events> delegate)
{
    mDelegate = delegate;
    mDescription = description;
}
 
开发者ID:dmfs,项目名称:ContentPal,代码行数:6,代码来源:Described.java

示例15: Colored

import android.provider.CalendarContract; //导入方法依赖的package包/类
public Colored(int color, @NonNull RowData<CalendarContract.Events> delegate)
{
    mDelegate = delegate;
    mColor = color;
}
 
开发者ID:dmfs,项目名称:ContentPal,代码行数:6,代码来源:Colored.java


注:本文中的android.provider.CalendarContract.Events方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。