ScratchView icon indicating copy to clipboard operation
ScratchView copied to clipboard

com.cooltechworks.views.ScratchImageView.getImageBounds (ScratchImageView.java:397)

Open varundwarkani opened this issue 6 years ago • 4 comments

I am getting repeated crash in this.

varundwarkani avatar Jan 15 '19 17:01 varundwarkani

Fatal Exception: java.lang.NullPointerException Attempt to invoke virtual method 'android.graphics.Rect android.graphics.drawable.Drawable.getBounds()' on a null object reference com.cooltechworks.views.ScratchImageView.getImageBounds

varundwarkani avatar Jan 15 '19 19:01 varundwarkani

@varundwarkani : Can you get your sample code or fork the repo and send a snapshot with step to reproduce

sharish avatar Feb 18 '19 15:02 sharish

yeh the problem is real .

Fix : I used mDrawable instead of getDrawable() in getImageBounds function . Dont know if the solution has any side-effects, but works just fine for me.

Kida007 avatar Dec 27 '19 20:12 Kida007

Can i get .jar file for this scratch view

AkshatDeveloper06 avatar Jan 14 '21 04:01 AkshatDeveloper06