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


Java TimeUtils.isConferenceInProgress方法代码示例

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


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

示例1: run

import com.google.samples.apps.iosched.util.TimeUtils; //导入方法依赖的package包/类
@Override
public void run() {
    ScheduleActivity activity = ScheduleActivity.this;
    if (activity.isDestroyed()) {
        LOGD(TAG, "Activity is not valid anymore. Stopping UI Updater");
        return;
    }

    LOGD(TAG, "Running MySchedule UI updater (now=" +
            new Date(TimeUtils.getCurrentTime(activity)) + ")");

    mPresenter.onUserAction(ScheduleModel.MyScheduleUserActionEnum.REDRAW_UI, null);

    if (TimeUtils.isConferenceInProgress(activity)) {
        scheduleNextUiUpdate();
    }
}
 
开发者ID:google,项目名称:iosched,代码行数:18,代码来源:ScheduleActivity.java

示例2: populateNavDrawer

import com.google.samples.apps.iosched.util.TimeUtils; //导入方法依赖的package包/类
/**
 * Defines the Navigation Drawer items to display by updating {@code mNavDrawerItems} then
 * forces the Navigation Drawer to redraw itself.
 */
private void populateNavDrawer() {
    boolean attendeeAtVenue = SettingsUtils.isAttendeeAtVenue(this);
    boolean conferenceInProgress = TimeUtils.isConferenceInProgress(this);
    mNavDrawerItems.clear();

    // decide which items will appear in the nav drawer
    if (AccountUtils.hasActiveAccount(this)) {
        // Only logged-in users can save sessions, so if there is no active account,
        // there is no My Schedule
        mNavDrawerItems.add(NAVDRAWER_ITEM_MY_SCHEDULE);
    } else {
        // If no active account, show Sign In
        mNavDrawerItems.add(NAVDRAWER_ITEM_SIGN_IN);
    }

    // Explore is always shown.
    mNavDrawerItems.add(NAVDRAWER_ITEM_EXPLORE);

    // If the attendee is on-site, show Map on the nav drawer
    if (attendeeAtVenue) {
        mNavDrawerItems.add(NAVDRAWER_ITEM_MAP);
    }
    mNavDrawerItems.add(NAVDRAWER_ITEM_SEPARATOR);

    // Other items that are always in the nav drawer.
    mNavDrawerItems.add(NAVDRAWER_ITEM_SOCIAL);
    mNavDrawerItems.add(NAVDRAWER_ITEM_VIDEO_LIBRARY);
    mNavDrawerItems.add(NAVDRAWER_ITEM_SEPARATOR_SPECIAL);
    mNavDrawerItems.add(NAVDRAWER_ITEM_SETTINGS);
    mNavDrawerItems.add(NAVDRAWER_ITEM_ABOUT);

    // Debug menu only on debug builds.
    if (BuildConfig.DEBUG) {
        mNavDrawerItems.add(NAVDRAWER_ITEM_DEBUG);
    }

    createNavDrawerItems();
}
 
开发者ID:dreaminglion,项目名称:iosched-reader,代码行数:43,代码来源:BaseActivity.java

示例3: moveToCurrentTimeSlot

import com.google.samples.apps.iosched.util.TimeUtils; //导入方法依赖的package包/类
private void moveToCurrentTimeSlot() {
    // don't auto-scroll to current time outside of the conf or if user has manually scrolled
    if (mScrolled || !TimeUtils.isConferenceInProgress(getContext())) return;

    int nowPos = mAdapter.findPositionForTime(TimeUtils.getCurrentTime(getContext()));
    if (nowPos > 0) {
        LinearLayoutManager lm = (LinearLayoutManager) mRecyclerView.getLayoutManager();
        lm.scrollToPositionWithOffset(nowPos,
                getResources().getDimensionPixelOffset(R.dimen.spacing_normal));
    }
}
 
开发者ID:google,项目名称:iosched,代码行数:12,代码来源:MyIOFragment.java

示例4: onResume

import com.google.samples.apps.iosched.util.TimeUtils; //导入方法依赖的package包/类
@Override
public void onResume() {
    super.onResume();

    if (TimeUtils.isConferenceInProgress(this)) {
        scheduleNextUiUpdate();
    }
    mModel.addDataObservers();
}
 
开发者ID:google,项目名称:iosched,代码行数:10,代码来源:ScheduleActivity.java

示例5: maybePostUiRefreshRunnable

import com.google.samples.apps.iosched.util.TimeUtils; //导入方法依赖的package包/类
private void maybePostUiRefreshRunnable() {
    if (TimeUtils.isConferenceInProgress(getContext())) {
        mHandler.removeCallbacks(mUiRefreshRunnable);
        mHandler.postDelayed(mUiRefreshRunnable, UI_REFRESH_DELAY);
    }
}
 
开发者ID:google,项目名称:iosched,代码行数:7,代码来源:MyIOFragment.java


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