开发者

android sizing resolution

consideration notes: extending SurfaceView, implementing SurfaceHolder.Callback, and loading in bitmap(.png) images to render the canvas (9x9 grid).

I am trying to get the system to resize the images for me so that I don't have to manually create up-to 4 copies of everything (even 3*77 bitmaps is bad overhead [and yes I need all 77 potentially]) I would prefer just having 77 image files in res/drawables(not开发者_StackOverflow社区 all of them will be drawn at any given time; at most maybe 38, but needs to be dynamicly capable to change them out).

Q1: how do I get the system to resize the images without doing the white space thing that android.develop talks about for .9.png (considering that all of my grid images have black borders, and need to butt-up together)?

Q2: is there a unifying screen proportionality (4:3, 5:4) that I can fall back on so that diagonal lines don't look really bad?


A1:

Bitmap b= BitmapFactory.decodeResource(context.getResources(), R.drawable.b);
b=Bitmap.createScaledBitmap(b,newWidth, newHeight, true);

A2: i don't think so

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜