com.android.volley.Request.onFinish()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(6.2k)|赞(0)|评价(0)|浏览(85)

本文整理了Java中com.android.volley.Request.onFinish方法的一些代码示例,展示了Request.onFinish的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Request.onFinish方法的具体详情如下:
包路径:com.android.volley.Request
类名称:Request
方法名:onFinish

Request.onFinish介绍

[英]clear listeners when finished
[中]完成后清除侦听器

代码示例

代码示例来源:origin: mcxiaoke/android-volley

@Override
protected void onFinish() {
  super.onFinish();
  mListener = null;
}

代码示例来源:origin: mcxiaoke/android-volley

@Override
protected void onFinish() {
  super.onFinish();
  mListener = null;
}

代码示例来源:origin: mcxiaoke/android-volley

/**
 * Notifies the request queue that this request has finished (successfully or with error).
 *
 * <p>Also dumps all events from this request's event log; for debugging.</p>
 */
void finish(final String tag) {
  if (mRequestQueue != null) {
    mRequestQueue.finish(this);
    onFinish();
  }
  if (MarkerLog.ENABLED) {
    final long threadId = Thread.currentThread().getId();
    if (Looper.myLooper() != Looper.getMainLooper()) {
      // If we finish marking off of the main thread, we need to
      // actually do it on the main thread to ensure correct ordering.
      Handler mainThread = new Handler(Looper.getMainLooper());
      mainThread.post(new Runnable() {
        @Override
        public void run() {
          mEventLog.add(tag, threadId);
          mEventLog.finish(this.toString());
        }
      });
      return;
    }
    mEventLog.add(tag, threadId);
    mEventLog.finish(this.toString());
  }
}

代码示例来源:origin: MewX/light-novel-library_Wenku8_Android

@Override
protected void onFinish() {
  super.onFinish();
  mListener = null;
}

代码示例来源:origin: com.mcxiaoke.volley/library

@Override
protected void onFinish() {
  super.onFinish();
  mListener = null;
}

代码示例来源:origin: jungletian/TitanjumNote

@Override
protected void onFinish() {
  super.onFinish();
  mListener = null;
}

代码示例来源:origin: tazimete/android-app-food-delivery-system

@Override
protected void onFinish() {
  super.onFinish();
  mListener = null;
}

代码示例来源:origin: MewX/light-novel-library_Wenku8_Android

@Override
protected void onFinish() {
  super.onFinish();
  mListener = null;
}

代码示例来源:origin: com.mcxiaoke.volley/library

@Override
protected void onFinish() {
  super.onFinish();
  mListener = null;
}

代码示例来源:origin: jungletian/TitanjumNote

@Override
protected void onFinish() {
  super.onFinish();
  mListener = null;
}

代码示例来源:origin: tazimete/android-app-food-delivery-system

@Override
protected void onFinish() {
  super.onFinish();
  mListener = null;
}

代码示例来源:origin: tazimete/android-app-food-delivery-system

@Override
protected void onFinish() {
  super.onFinish();
  mListener = null;
}

代码示例来源:origin: tazimete/android-app-food-delivery-system

@Override
protected void onFinish() {
  super.onFinish();
  mListener = null;
}

代码示例来源:origin: com.mcxiaoke.volley/library

/**
 * Notifies the request queue that this request has finished (successfully or with error).
 *
 * <p>Also dumps all events from this request's event log; for debugging.</p>
 */
void finish(final String tag) {
  if (mRequestQueue != null) {
    mRequestQueue.finish(this);
    onFinish();
  }
  if (MarkerLog.ENABLED) {
    final long threadId = Thread.currentThread().getId();
    if (Looper.myLooper() != Looper.getMainLooper()) {
      // If we finish marking off of the main thread, we need to
      // actually do it on the main thread to ensure correct ordering.
      Handler mainThread = new Handler(Looper.getMainLooper());
      mainThread.post(new Runnable() {
        @Override
        public void run() {
          mEventLog.add(tag, threadId);
          mEventLog.finish(this.toString());
        }
      });
      return;
    }
    mEventLog.add(tag, threadId);
    mEventLog.finish(this.toString());
  }
}

代码示例来源:origin: MewX/light-novel-library_Wenku8_Android

/**
 * Notifies the request queue that this request has finished (successfully or with error).
 *
 * <p>Also dumps all events from this request's event log; for debugging.</p>
 */
void finish(final String tag) {
  if (mRequestQueue != null) {
    mRequestQueue.finish(this);
    onFinish();
  }
  if (MarkerLog.ENABLED) {
    final long threadId = Thread.currentThread().getId();
    if (Looper.myLooper() != Looper.getMainLooper()) {
      // If we finish marking off of the main thread, we need to
      // actually do it on the main thread to ensure correct ordering.
      Handler mainThread = new Handler(Looper.getMainLooper());
      mainThread.post(new Runnable() {
        @Override
        public void run() {
          mEventLog.add(tag, threadId);
          mEventLog.finish(this.toString());
        }
      });
      return;
    }
    mEventLog.add(tag, threadId);
    mEventLog.finish(this.toString());
  }
}

代码示例来源:origin: tazimete/android-app-food-delivery-system

/**
 * Notifies the request queue that this request has finished (successfully or with error).
 *
 * <p>Also dumps all events from this request's event log; for debugging.</p>
 */
void finish(final String tag) {
  if (mRequestQueue != null) {
    mRequestQueue.finish(this);
    onFinish();
  }
  if (MarkerLog.ENABLED) {
    final long threadId = Thread.currentThread().getId();
    if (Looper.myLooper() != Looper.getMainLooper()) {
      // If we finish marking off of the main thread, we need to
      // actually do it on the main thread to ensure correct ordering.
      Handler mainThread = new Handler(Looper.getMainLooper());
      mainThread.post(new Runnable() {
        @Override
        public void run() {
          mEventLog.add(tag, threadId);
          mEventLog.finish(this.toString());
        }
      });
      return;
    }
    mEventLog.add(tag, threadId);
    mEventLog.finish(this.toString());
  }
}

代码示例来源:origin: jungletian/TitanjumNote

/**
 * Notifies the request queue that this request has finished (successfully or with error).
 *
 * <p>Also dumps all events from this request's event log; for debugging.</p>
 */
void finish(final String tag) {
  if (mRequestQueue != null) {
    mRequestQueue.finish(this);
    onFinish();
  }
  if (MarkerLog.ENABLED) {
    final long threadId = Thread.currentThread().getId();
    if (Looper.myLooper() != Looper.getMainLooper()) {
      // If we finish marking off of the main thread, we need to
      // actually do it on the main thread to ensure correct ordering.
      Handler mainThread = new Handler(Looper.getMainLooper());
      mainThread.post(new Runnable() {
        @Override
        public void run() {
          mEventLog.add(tag, threadId);
          mEventLog.finish(this.toString());
        }
      });
      return;
    }
    mEventLog.add(tag, threadId);
    mEventLog.finish(this.toString());
  }
}

代码示例来源:origin: tazimete/android-app-food-delivery-system

/**
 * Notifies the request queue that this request has finished (successfully or with error).
 *
 * <p>Also dumps all events from this request's event log; for debugging.</p>
 */
void finish(final String tag) {
  if (mRequestQueue != null) {
    mRequestQueue.finish(this);
    onFinish();
  }
  if (MarkerLog.ENABLED) {
    final long threadId = Thread.currentThread().getId();
    if (Looper.myLooper() != Looper.getMainLooper()) {
      // If we finish marking off of the main thread, we need to
      // actually do it on the main thread to ensure correct ordering.
      Handler mainThread = new Handler(Looper.getMainLooper());
      mainThread.post(new Runnable() {
        @Override
        public void run() {
          mEventLog.add(tag, threadId);
          mEventLog.finish(this.toString());
        }
      });
      return;
    }
    mEventLog.add(tag, threadId);
    mEventLog.finish(this.toString());
  }
}

相关文章

微信公众号

最新文章

更多