【问题标题】:Loop a Volley request循环一个 Volley 请求
【发布时间】:2014-10-30 10:48:54
【问题描述】:

我想多次重复截击请求。
类似于:

For (int i=0;i<10;i++){

RequestA{
TextView.setText(TextView.getText + JsonArray[i].toString);
}

}

当我运行程序时,FOR 循环 10 次,但 Volley 请求只有一次 i=9,所以在 TextView 中只打印 JsonArray[i=9] 的内容。
所以我的问题是:为什么 Volley Request 也没有循环 10 次?

【问题讨论】:

    标签: loops for-loop request android-volley


    【解决方案1】:

    我不知道你如何使用截击。但是,我相信截击确实循环了 10 次。您只看到 JsonArray[i=9] 的原因是您正在覆盖 textView 中的值。尝试使用 log 获取值并从 logcat 中读取,而不是使用 textView。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-03-21
      • 2019-03-24
      • 1970-01-01
      • 1970-01-01
      • 2017-06-04
      • 2011-07-01
      相关资源
      最近更新 更多