自定義控件出錯(cuò)
您好老師!為什么我自定義完了出現(xiàn)空指針的異常 java.lang.NullPointerException ? ?at android.graphics.Canvas.throwIfCannotDraw(Canvas.java:1224) ? ?at android.graphics.Canvas.drawBitmap(Canvas.java:1359) ? ?at com.imooc.weixin6_0.ChangeColorIconWithText.onDraw(ChangeColorIconWithText.java:117)
2015-02-28
是不是icon沒有設(shè)置,詳細(xì)對(duì)比下源碼以及布局文件。