How to return ArrayList from AsyncTask to another class?

后端 未结 7 674
被撕碎了的回忆
被撕碎了的回忆 2021-01-21 20:01

i want to get Ftp folders list from server using AsyncTask and return folders names ArrayList to main class and update spinner adapter.

In main class i got spinner with

7条回答
  •  無奈伤痛
    2021-01-21 20:07

    onPostExecute methods runs in UI thread. You can assign the result in postexecute() to your arraylist in main method. Update the adapter by calling notifydatasetChanged to update your listview.

提交回复
热议问题