android - View background not drawn correctly -


i'm trying create view draws background colour image on top of it. image should transformed matrix. background should not be.

the ondraw() method looks this:

protected void ondraw(canvas canvas) {          canvas.drawrect(0, 0, canvas.getwidth(), canvas.getheight(), paint);          drawable drawable = getimagedrawable();          if (drawable == null) {             return;         }          int count = canvas.save();          if (cliprect != null) {             canvas.cliprect(cliprect);         }         canvas.concat(matrix);         drawable.draw(canvas);         canvas.restoretocount(count);     } 

on of devices i've tested on, background above , left of image not drawn correctly. see video here: https://youtu.be/rno2xxaenua you'll need pause video see what's going on.

this problem caused accidentally overriding view.getmatrix()


Comments

Popular posts from this blog

javascript - How to get current YouTube IDs via iMacros? -

c# - Maintaining a program folder in program files out of date? -

emulation - Android map show my location didn't work -