Android中的屏幕兼容性问题 [英] Screen Compatibility issue in android

查看:101
本文介绍了Android中的屏幕兼容性问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的应用程序有问题.我已经使用图像按钮创建了标签栏,当我在480 * 800 hdpi设备中运行该应用程序时,当我在240 * 320设备中运行时,标签栏图像可以完美显示按钮无法正常显示.我已经创建了可绘制的文件夹,并且还添加了图像

I have a problem regarding my app.I have created tab bar using image button,when I run the app in 480*800 hdpi device the tab bar images are displaying perfectly when I run in 240*320 device the images in image button are not displaying properly.I have created the drawable folders and added the images also

drawable
drawable-hdpi
drawable-ldpi
drawable-mdpi
drawable-xhdpi

推荐答案

尝试以下布局方案.我在 http://jamil中找到. fluidsoul.net/2011/03/06/creating-android-applications-for-multiple-screen-sizes .

Try following scenario of layout. I found at http://jamil.fluidsoul.net/2011/03/06/creating-android-applications-for-multiple-screen-sizes.

Low density Small screens QVGA 240x320 (120dpi):

layout-small-ldpi (240x320)  
layout-small-land-ldpi (320x240)

Low density Normal screens WVGA400 240x400 (x432) (120dpi):

layout-ldpi  (240 x 400 )
layout-land-ldpi  (400 x 240 )

Medium density Normal screens HVGA 320x480 (160dpi):

layout-mdpi (320 x 480 )
layout-land-mdpi (480 x 320 )

Medium density Large screens HVGA 320x480 (160dpi):

layout-large-mdpi (320 x 480 )
layout-large-land-mdpi (480 x 320)

Galaxy Tab ( 240 dpi ):

layout-large  (600 x 1024) 
layout-large-land  (1024 x 600)

High density Normal screens WVGA800 480x800 (x854) (240 dpi):

layout-hdpi (480 x 800)
layout-land-hdpi (800 x 480)

Xoom (medium density large but 1280x800 res) (160 dpi):

layout-xlarge (800 x 1280)
layout-xlarge-land (1280 x 800)

如果以图形布局显示的结果与其他所有显示最匹配,则您在原始设备中也将获得相同的输出.

If outcome display in Graphical layout best matches with all other, you will get same output in original device also.

这篇关于Android中的屏幕兼容性问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆