Пример #1
0
  public void setAutorefreshEnabled(boolean enabled) {
    mAutorefreshEnabled = enabled;

    if (!mAutorefreshEnabled) cancelRefreshTimer();
    else scheduleRefreshTimerIfEnabled();
  }
Пример #2
0
 protected void scheduleRefreshTimerIfEnabled() {
   cancelRefreshTimer();
   if (!mAutorefreshEnabled || mRefreshTimeMilliseconds <= 0) return;
   mRefreshHandler.postDelayed(mRefreshRunnable, mRefreshTimeMilliseconds);
 }