如何将AsyncTask中生成的List返回给Activity?
我的LoadStringsAsync类:
public class LoadStringsAsync extends AsyncTask<Void,Void,List<String> > { List<String> str; @Override protected void onPreExecute() { super.onPreExecute(); ... } @Override protected List<String> doInBackground(Void... arg0) { ... get content from the internet and fill the list ... } @Override protected void onPostExecute(List<String> str) { super.onPostExecute(events); ... } }
我需要在我的Activity中使用List才能使用它. (不仅仅是在ListView中显示它:P)
有什么建议怎么做? 原文链接:https://www.f2er.com/android/312057.html