課程
/移動開發(fā)
/Android
/Android-仿微信語音聊天
如題。而且把super改成了this
2016-08-04
源自:Android-仿微信語音聊天 2-1
正在回答
如果你在java代碼中添加這個自定義控件一般會調(diào)用一個參數(shù)的構(gòu)造方法來new這個自定義控件,這樣寫省事啊
我問的是為什么這么做。。。
public AudioRecorderButton(Context context, AttributeSet attrs) { ? ?super(context, attrs);}public AudioRecorderButton(Context context) { ? ?this(context, null);}
舉報
結(jié)合自定義View和API,Dialog管理等實現(xiàn)實現(xiàn)微信語音
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號-11 京公網(wǎng)安備11010802030151號
購課補(bǔ)貼聯(lián)系客服咨詢優(yōu)惠詳情
慕課網(wǎng)APP您的移動學(xué)習(xí)伙伴
掃描二維碼關(guān)注慕課網(wǎng)微信公眾號
2017-02-01
如果你在java代碼中添加這個自定義控件一般會調(diào)用一個參數(shù)的構(gòu)造方法來new這個自定義控件,這樣寫省事啊
2016-08-05
我問的是為什么這么做。。。
2016-08-04
public AudioRecorderButton(Context context, AttributeSet attrs) {
? ?super(context, attrs);
}
public AudioRecorderButton(Context context) {
? ?this(context, null);
}