コード例 #1
0
  /**
   * Do real refresh work. If there is a hook, execute the hook first.
   *
   * @param ignoreHook
   */
  private void notifyUIRefreshComplete(boolean ignoreHook) {
    /**
     * After hook operation is done, {@link #notifyUIRefreshComplete} will be call in resume action
     * to ignore hook.
     */
    if (mPtrIndicator.hasLeftStartPosition() && !ignoreHook && mRefreshCompleteHook != null) {
      if (DEBUG) {
        PtrCLog.d(LOG_TAG, "notifyUIRefreshComplete mRefreshCompleteHook run.");
      }

      mRefreshCompleteHook.takeOver();
      return;
    }
    if (mPtrUIHandlerHolder.hasHandler()) {
      if (DEBUG) {
        PtrCLog.i(LOG_TAG, "PtrUIHandler: onUIRefreshComplete");
      }
      mPtrUIHandlerHolder.onUIRefreshComplete(this);
    }
    mPtrIndicator.onUIRefreshComplete();
    tryScrollBackToTopAfterComplete();
    tryToNotifyReset();
  }