开发者

Multiple Screen Size/Density support

开发者 https://www.devze.com 2023-02-22 18:39 出处:网络
I am creating an application for Android phones and have been using an emulator to test. I have created a SurfaceView and overwritten the onDraw function to draw bitmaps on the canvas.

I am creating an application for Android phones and have been using an emulator to test. I have created a SurfaceView and overwritten the onDraw function to draw bitmaps on the canvas. I also have some text that I am drawing onto this screen using the canvas.drawText function. I defined the text size as 21 using a paint.setTextSize.

The problem I am facing is that on different emulators with different resolutions and screen sizes the text can range from looking too large to too small. Is there some way to fix this using the AndroidManifest 开发者_开发问答file or modifying the .xml files? Thanks!


Did you try this in your android manifest?

<supports-screens android:resizeable=["true" | "false"]
                  android:smallScreens=["true" | "false"] 
                  android:normalScreens=["true" | "false"] 
                  android:largeScreens=["true" | "false"] 
                  android:xlargeScreens=["true" | "false"]
                  android:anyDensity=["true" | "false"] />
0

精彩评论

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