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

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

本文整理了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

  1. @Override
  2. protected void onFinish() {
  3. super.onFinish();
  4. mListener = null;
  5. }

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

  1. @Override
  2. protected void onFinish() {
  3. super.onFinish();
  4. mListener = null;
  5. }

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

  1. /**
  2. * Notifies the request queue that this request has finished (successfully or with error).
  3. *
  4. * <p>Also dumps all events from this request's event log; for debugging.</p>
  5. */
  6. void finish(final String tag) {
  7. if (mRequestQueue != null) {
  8. mRequestQueue.finish(this);
  9. onFinish();
  10. }
  11. if (MarkerLog.ENABLED) {
  12. final long threadId = Thread.currentThread().getId();
  13. if (Looper.myLooper() != Looper.getMainLooper()) {
  14. // If we finish marking off of the main thread, we need to
  15. // actually do it on the main thread to ensure correct ordering.
  16. Handler mainThread = new Handler(Looper.getMainLooper());
  17. mainThread.post(new Runnable() {
  18. @Override
  19. public void run() {
  20. mEventLog.add(tag, threadId);
  21. mEventLog.finish(this.toString());
  22. }
  23. });
  24. return;
  25. }
  26. mEventLog.add(tag, threadId);
  27. mEventLog.finish(this.toString());
  28. }
  29. }

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

  1. @Override
  2. protected void onFinish() {
  3. super.onFinish();
  4. mListener = null;
  5. }

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

  1. @Override
  2. protected void onFinish() {
  3. super.onFinish();
  4. mListener = null;
  5. }

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

  1. @Override
  2. protected void onFinish() {
  3. super.onFinish();
  4. mListener = null;
  5. }

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

  1. @Override
  2. protected void onFinish() {
  3. super.onFinish();
  4. mListener = null;
  5. }

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

  1. @Override
  2. protected void onFinish() {
  3. super.onFinish();
  4. mListener = null;
  5. }

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

  1. @Override
  2. protected void onFinish() {
  3. super.onFinish();
  4. mListener = null;
  5. }

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

  1. @Override
  2. protected void onFinish() {
  3. super.onFinish();
  4. mListener = null;
  5. }

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

  1. @Override
  2. protected void onFinish() {
  3. super.onFinish();
  4. mListener = null;
  5. }

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

  1. @Override
  2. protected void onFinish() {
  3. super.onFinish();
  4. mListener = null;
  5. }

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

  1. @Override
  2. protected void onFinish() {
  3. super.onFinish();
  4. mListener = null;
  5. }

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

  1. /**
  2. * Notifies the request queue that this request has finished (successfully or with error).
  3. *
  4. * <p>Also dumps all events from this request's event log; for debugging.</p>
  5. */
  6. void finish(final String tag) {
  7. if (mRequestQueue != null) {
  8. mRequestQueue.finish(this);
  9. onFinish();
  10. }
  11. if (MarkerLog.ENABLED) {
  12. final long threadId = Thread.currentThread().getId();
  13. if (Looper.myLooper() != Looper.getMainLooper()) {
  14. // If we finish marking off of the main thread, we need to
  15. // actually do it on the main thread to ensure correct ordering.
  16. Handler mainThread = new Handler(Looper.getMainLooper());
  17. mainThread.post(new Runnable() {
  18. @Override
  19. public void run() {
  20. mEventLog.add(tag, threadId);
  21. mEventLog.finish(this.toString());
  22. }
  23. });
  24. return;
  25. }
  26. mEventLog.add(tag, threadId);
  27. mEventLog.finish(this.toString());
  28. }
  29. }

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

  1. /**
  2. * Notifies the request queue that this request has finished (successfully or with error).
  3. *
  4. * <p>Also dumps all events from this request's event log; for debugging.</p>
  5. */
  6. void finish(final String tag) {
  7. if (mRequestQueue != null) {
  8. mRequestQueue.finish(this);
  9. onFinish();
  10. }
  11. if (MarkerLog.ENABLED) {
  12. final long threadId = Thread.currentThread().getId();
  13. if (Looper.myLooper() != Looper.getMainLooper()) {
  14. // If we finish marking off of the main thread, we need to
  15. // actually do it on the main thread to ensure correct ordering.
  16. Handler mainThread = new Handler(Looper.getMainLooper());
  17. mainThread.post(new Runnable() {
  18. @Override
  19. public void run() {
  20. mEventLog.add(tag, threadId);
  21. mEventLog.finish(this.toString());
  22. }
  23. });
  24. return;
  25. }
  26. mEventLog.add(tag, threadId);
  27. mEventLog.finish(this.toString());
  28. }
  29. }

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

  1. /**
  2. * Notifies the request queue that this request has finished (successfully or with error).
  3. *
  4. * <p>Also dumps all events from this request's event log; for debugging.</p>
  5. */
  6. void finish(final String tag) {
  7. if (mRequestQueue != null) {
  8. mRequestQueue.finish(this);
  9. onFinish();
  10. }
  11. if (MarkerLog.ENABLED) {
  12. final long threadId = Thread.currentThread().getId();
  13. if (Looper.myLooper() != Looper.getMainLooper()) {
  14. // If we finish marking off of the main thread, we need to
  15. // actually do it on the main thread to ensure correct ordering.
  16. Handler mainThread = new Handler(Looper.getMainLooper());
  17. mainThread.post(new Runnable() {
  18. @Override
  19. public void run() {
  20. mEventLog.add(tag, threadId);
  21. mEventLog.finish(this.toString());
  22. }
  23. });
  24. return;
  25. }
  26. mEventLog.add(tag, threadId);
  27. mEventLog.finish(this.toString());
  28. }
  29. }

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

  1. /**
  2. * Notifies the request queue that this request has finished (successfully or with error).
  3. *
  4. * <p>Also dumps all events from this request's event log; for debugging.</p>
  5. */
  6. void finish(final String tag) {
  7. if (mRequestQueue != null) {
  8. mRequestQueue.finish(this);
  9. onFinish();
  10. }
  11. if (MarkerLog.ENABLED) {
  12. final long threadId = Thread.currentThread().getId();
  13. if (Looper.myLooper() != Looper.getMainLooper()) {
  14. // If we finish marking off of the main thread, we need to
  15. // actually do it on the main thread to ensure correct ordering.
  16. Handler mainThread = new Handler(Looper.getMainLooper());
  17. mainThread.post(new Runnable() {
  18. @Override
  19. public void run() {
  20. mEventLog.add(tag, threadId);
  21. mEventLog.finish(this.toString());
  22. }
  23. });
  24. return;
  25. }
  26. mEventLog.add(tag, threadId);
  27. mEventLog.finish(this.toString());
  28. }
  29. }

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

  1. /**
  2. * Notifies the request queue that this request has finished (successfully or with error).
  3. *
  4. * <p>Also dumps all events from this request's event log; for debugging.</p>
  5. */
  6. void finish(final String tag) {
  7. if (mRequestQueue != null) {
  8. mRequestQueue.finish(this);
  9. onFinish();
  10. }
  11. if (MarkerLog.ENABLED) {
  12. final long threadId = Thread.currentThread().getId();
  13. if (Looper.myLooper() != Looper.getMainLooper()) {
  14. // If we finish marking off of the main thread, we need to
  15. // actually do it on the main thread to ensure correct ordering.
  16. Handler mainThread = new Handler(Looper.getMainLooper());
  17. mainThread.post(new Runnable() {
  18. @Override
  19. public void run() {
  20. mEventLog.add(tag, threadId);
  21. mEventLog.finish(this.toString());
  22. }
  23. });
  24. return;
  25. }
  26. mEventLog.add(tag, threadId);
  27. mEventLog.finish(this.toString());
  28. }
  29. }

相关文章