亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

適配器問題

適配器問題

不吃香菜和芹菜 2016-03-22 19:16:18
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;?? ??? ???? }
查看完整描述

1 回答

已采納
?
亞洲狂人

TA貢獻1條經驗 獲得超1個贊

String 大小寫

查看完整回答
1 反對 回復 2016-03-23
  • 1 回答
  • 0 關注
  • 1045 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號