I am creating my own view and drawing a bitmap in the canvas.If I set it at say (100,100) it is fine on a 320*480 screen but on bigger 480*800 it does not show up in the same place.
How can I get it to be at the same place.I have searched Google much but can’t find a solution.
Any tips? Tutorials?
Thanks
You can use this method in your custom view to get the exact size of the canvas. Then you can calculate the position and the size of the rectangle where you will draw you bitmap.
You can also resize your bitmaps within this method to accomodate the size of the canvas.
Even though your canvas may take the full screen, in Android 3.0 there is a bar on the bottom which will take some space, hence onSizeChanged gives a real size of the canvas.