課程
/移動開發(fā)
/Android
/Android必學-BaseAdapter的使用與優(yōu)化
想問下getview()的viewgroup parent參數(shù)有什么用?
2015-06-06
源自:Android必學-BaseAdapter的使用與優(yōu)化
正在回答
可以這樣用
if (convertView==null){ ? ?convertView=View.inflate(parent.getContext(), R.layout.room_list_item,null);}
可以不通過構造函數(shù)傳遞Context參數(shù)
煒燁鴻圖 提問者
當你需要用到的時候就有用了
舉報
了解數(shù)據(jù)適配器的使用方法,寫出高效、文藝的BaseAdapter
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號-11 京公網(wǎng)安備11010802030151號
購課補貼聯(lián)系客服咨詢優(yōu)惠詳情
慕課網(wǎng)APP您的移動學習伙伴
掃描二維碼關注慕課網(wǎng)微信公眾號
2015-06-06
可以這樣用
if (convertView==null){
? ?convertView=View.inflate(parent.getContext(), R.layout.room_list_item,null);
}
可以不通過構造函數(shù)傳遞Context參數(shù)
2015-06-10
當你需要用到的時候就有用了