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


Java Sessions.LIVESTREAM_SELECTION属性代码示例

本文整理汇总了Java中com.google.android.apps.iosched.provider.ScheduleContract.Sessions.LIVESTREAM_SELECTION属性的典型用法代码示例。如果您正苦于以下问题:Java Sessions.LIVESTREAM_SELECTION属性的具体用法?Java Sessions.LIVESTREAM_SELECTION怎么用?Java Sessions.LIVESTREAM_SELECTION使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在com.google.android.apps.iosched.provider.ScheduleContract.Sessions的用法示例。


在下文中一共展示了Sessions.LIVESTREAM_SELECTION属性的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onCreateLoader

@Override
public Loader<Cursor> onCreateLoader(int id, Bundle args) {
    switch (id) {
        case SessionSummaryQuery._TOKEN:
            return new CursorLoader(this, Sessions.buildWithTracksUri(mSessionId),
                    SessionSummaryQuery.PROJECTION, null, null, null);
        case SessionsQuery._TOKEN:
            boolean futureSessions = false;
            if (args != null) {
                futureSessions = args.getBoolean(LOADER_SESSIONS_ARG, false);
            }
            final long currentTime = UIUtils.getCurrentTime(this);
            String selection = Sessions.LIVESTREAM_SELECTION + " and ";
            String[] selectionArgs;
            if (!futureSessions) {
                selection += Sessions.AT_TIME_SELECTION;
                selectionArgs = Sessions.buildAtTimeSelectionArgs(currentTime);
            } else {
                selection += Sessions.UPCOMING_SELECTION;
                selectionArgs = Sessions.buildUpcomingSelectionArgs(currentTime);
            }
            return new CursorLoader(this, Sessions.buildWithTracksUri(),
                    SessionsQuery.PROJECTION, selection, selectionArgs, null);
    }
    return null;
}
 
开发者ID:amardeshbd,项目名称:google-iosched,代码行数:26,代码来源:SessionLivestreamActivity.java

示例2: onCreateLoader

@Override
public Loader<Cursor> onCreateLoader(int id, Bundle args) {
    switch (id) {
        case SessionSummaryQuery._TOKEN:
            return new CursorLoader(
                    this, Sessions.buildWithTracksUri(mSessionId),
                    SessionSummaryQuery.PROJECTION, null, null, null);

        case SessionsQuery._TOKEN:
            final long currentTime = UIUtils.getCurrentTime(this);
            String selection = Sessions.LIVESTREAM_SELECTION + " and "
                    + Sessions.AT_TIME_SELECTION;
            String[] selectionArgs = Sessions.buildAtTimeSelectionArgs(currentTime);
            return new CursorLoader(this, Sessions.buildWithTracksUri(),
                    SessionsQuery.PROJECTION, selection,
                    selectionArgs, null);

        case UPCOMING_SESSIONS_QUERY_ID:
            final long newCurrentTime = UIUtils.getCurrentTime(this);
            String sessionsSelection = Sessions.LIVESTREAM_SELECTION + " and "
                    + Sessions.UPCOMING_SELECTION;
            String[] sessionsSelectionArgs =
                    Sessions.buildUpcomingSelectionArgs(newCurrentTime);
            return new CursorLoader(this, Sessions.buildWithTracksUri(),
                    SessionsQuery.PROJECTION, sessionsSelection,
                    sessionsSelectionArgs, null);
    }
    return null;
}
 
开发者ID:amardeshbd,项目名称:google-iosched,代码行数:29,代码来源:GoogleTVSessionLivestreamActivity.java


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