コード例 #1
0
 public void setLoading(boolean loading) {
   if (mLoading != loading) {
     ensureTarget();
     mCurrPercentage = 0;
     mLoading = loading;
     if (mLoading) {
       mProgressBarBottom.start();
     } else {
       mLastDirection = Mode.DISABLED;
       mProgressBarBottom.stop();
     }
   }
 }
コード例 #2
0
 /**
  * Notify the widget that refresh state has changed. Do not call this when refresh is triggered by
  * a swipe gesture.
  *
  * @param refreshing Whether or not the view should show refresh progress.
  */
 public void setRefreshing(boolean refreshing) {
   if (mRefreshing != refreshing) {
     ensureTarget();
     mCurrPercentage = 0;
     mRefreshing = refreshing;
     if (mRefreshing) {
       mProgressBar.start();
     } else {
       mLastDirection = Mode.DISABLED;
       mProgressBar.stop();
     }
   }
 }