public void handleMessage(Message msg) {
ArrayList<HashMap<String, Object>> lists=(ArrayList<HashMap<String, Object>>) msg.obj;
super.handleMessage(msg);
String[] from = { "icon", "key", "String" };
// list_item.xml中对应的控件ID
int[] to = { R.id.img1, R.id.textView0, R.id.textView1, };
adapter = new SimpleAdapter(this, lists, R.layout.list_item, from, to);
pd.dismiss();
}
Description Resource Path Location Type
The constructor SimpleAdapter(new Handler(){}, ArrayList<HashMap<String,Object>>, int, String[], int[]) is undefined ApiDemos.java /ExchangeRagev1.0/src/com/example/android/apis line 58 Java Problem
什么意思???哪里错了??
------解决方案--------------------
adapter = new SimpleAdapter(this, lists, R.layout.list_item, from, to);
这里是this是Handler,因为你这个方法是在放在Handler里的,所以尼这里不应该使用this,而应该使用ApiDemos.this(ApiDemos是你的类名)