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 - Feed FileReader from server side files -

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

oracle - pls-00402 alias required in select list of cursor to avoid duplicate column names -