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