datalist.add(map)出错了,add方法下面出现红线 :The method add(Map<R.string,Object>) in the type List<Map<R.string,Object>> is not applicable for the arguments (Map<String,Object>) 还有 simple_Adapter=new SimpleAdapter(this, getData(), R.layout.item,new String[]{"imageview","tv"},new int[]{R.id.imag 从new 到后面全是红线,我猜应该是 getData的问题。这是getData的代码: private List<Map<string,Object>> getData(){ for(int i=0;i<10;i++) { Map<String,Object> map=new HashMap<String,Object>(); map.put("imageview", R.drawable.ic_launcher); map.put("tv","爸爸+i"); data.add(map); } return data; }
添加回答
举报
0/150
提交
取消