最新回答 / 圣见兮月
第三行 改成 xmlns:custom="http://schemas.android.com/apk/res/com.example.smarthomer"
2017-02-05
已采纳回答 / AlexSandra
leftTextColor调用的是TypedArray类的方法getColor,声明如下:public int getColor(@StyleableRes int index, @ColorInt int defValue)那个defValue是指xml中没有找到相应的属性设置时,将这个值作为默认值返回,就是说你没有在xml中设置leftTextColor对应的属性时,getColor就把defValue作为结果赋值给leftTextColorgetDrawable返回的是一个Drawable对象,显示...
2017-01-28
最新回答 / yilimy
先抛出一个观点:监听,跟绘制没有关系,跟构造也没有关系(要有监听属性算不算?)。我来把问题里的词换一下,你看怎么样:“监听的方法”->“回调方法”->“对方法的引用”不太准确,但想到了什么没有?因为是引用,所以可以替换value的,对吧?
2017-01-16