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

libGdx unable to find files in android application data directory -

php - Webix Data Loading from Laravel Link -

python - Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>] error -