本文整理汇总了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();
}
}
示例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();
}
示例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));
}
}
示例4: onResume
import com.google.samples.apps.iosched.util.TimeUtils; //导入方法依赖的package包/类
@Override
public void onResume() {
super.onResume();
if (TimeUtils.isConferenceInProgress(this)) {
scheduleNextUiUpdate();
}
mModel.addDataObservers();
}
示例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);
}
}