I'm creating an Android game and I want everyone who plays it -- no matter the size or shape of their screen -- to see the same 480x800 playfield but, depending on the actual resolution of their screen, scaled to fit their screen while maintaining the correct aspect ratio using letterboxing or black bars on the edges of the screen to fill in the gaps on the sides/top/bottom.
I'm using Canvas to develop my game but I don't know where to start, or have any idea of best practices for accomplishing this. Could someone enlighten me?
UPDATE: What I had in mind was using different image resources from hdpi/ldpi/mdpi resource folders and drawing them so bigger screens are restricted to the aspect ratio still but will be higher resolution. So drawing to a 480x800 bitmap won't work in my situation.