从listview适配器调用AsyncTask

时间:2013-07-02 11:24:36

标签: android listview android-asynctask

我想从listview适配器的getview方法运行一个活动的asynctask。代码是:

AsyncRecordShow ars =( (BaseScreen) _context).new AsyncShowView("",serId, evntId);
ars.execute();

抛出ClassCastException:

07-02 16:51:04.697: E/AndroidRuntime(12841): java.lang.ClassCastException: android.app.Application cannot be cast to com.myapp.skyapp.BaseScreen

我该怎么做?任何帮助将不胜感激。

由于

1 个答案:

答案 0 :(得分:0)

尝试AsyncRecordShow ars =(_context).new AsyncShowView("",serId, evntId);