課程
/移動開發(fā)
/Android
/Android-打造萬能適配器
該方法您的layoutId是固定死的, 所以還需要一個參數(shù)傳進來。
2015-04-21
源自:Android-打造萬能適配器 4-1
正在回答
恩,繼續(xù)往后看,layoutId最終是最為參數(shù)傳遞的。
public?CommonAdapter(Context?context,?List<T>?datas?,?int?layoutId) { this.mContext?=?context; mInflater?=?LayoutInflater.from(context); this.mDatas?=?datas; this.layoutId?=?layoutId?; }
舉報
本課程通過對傳統(tǒng)的ListView數(shù)據(jù)綁定寫法,打造萬能適配器
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號-11 京公網(wǎng)安備11010802030151號
購課補貼聯(lián)系客服咨詢優(yōu)惠詳情
慕課網(wǎng)APP您的移動學(xué)習(xí)伙伴
掃描二維碼關(guān)注慕課網(wǎng)微信公眾號
2015-05-04
恩,繼續(xù)往后看,layoutId最終是最為參數(shù)傳遞的。