ScratchView icon indicating copy to clipboard operation
ScratchView copied to clipboard

Using vector asset as overlay image

Open sherantonettego opened this issue 5 years ago • 1 comments

Hi @AnupKumarPanwar ,

Should there be any issues using vector assets as the overlay image? I seem to be getting runtime errors because of it.

Thanks, Sher

sherantonettego avatar Jul 04 '20 04:07 sherantonettego

Yeah..getting error while using vector drawable for overlay image:

Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'int android.graphics.Bitmap.getWidth()' on a null object reference at android.graphics.Bitmap.createScaledBitmap(Bitmap.java:800) at com.anupkumarpanwar.scratchview.ScratchView.init(ScratchView.java:169) at com.anupkumarpanwar.scratchview.ScratchView.(ScratchView.java:119) ... 53 more

added the fix here: https://github.com/AnupKumarPanwar/ScratchView/pull/8

Shubhamsdr3 avatar Jan 30 '21 09:01 Shubhamsdr3