Android Canvas: put Bitmap in the middle of the screen

Published by ugu5ma on

Code:


canvas.drawBitmap(bitmap, (getMeasuredWidth()/2)-(bitmap.getWidth()/2), (getMeasuredHeight()/2 -(bitmap.getHeight()/2)), null);

Categories: Androidjava

0 Comments

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.