When supporting multiple screen sizes in Android, and having to draw my custom View s programmically, is using a Matrix to scale a Bitmap an efficient way of ensuring that it looks OK for the screen res? Is/isn’t this a best practice?
Thanks.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Look at http://developer.android.com/guide/practices/screens_support.html
Matrix and Bitmaps will probably work too, but you will have to do the same calculations for resizing over and over again, which is unnecessary and, if done for many images at once, will slow down the user interface. Do it once, create the resources, and be done with it.
Matrix and Bitmaps are used for on the fly bitmap transformations.