java.lang.ClassCastException: android.graphics.drawable.NinePatchDrawable cannot be cast to android.graphics.drawable.BitmapDrawable
if (kImageView.getDrawable().getClass() == NinePatchDrawable.class) { Log.w("###", "is 9-patch"); return; }
이 소스로 미리 검사를 하면 된다
'프로그래밍 > android' 카테고리의 다른 글
[android] async Image Downloader (2) | 2012.09.20 |
---|---|
[android] 내가 쓰는 이클립스 코드 포맷 (0) | 2012.09.07 |
[android] ClassCastException with NinePatchDrawable (0) | 2012.09.07 |
[android] Listener를 이용한 child view의 이벤트 발생 시 parent view 에서 받기 (0) | 2012.08.31 |
[android] FrameLayout tools:context (1) | 2012.08.31 |
[android] ScrollView의 LinearLayout이 꽉 차지 않을 때 (1) | 2012.06.09 |
댓글을 달아 주세요