Android布局(在设计Android中的GUI时出现问题) [英] Android Layouts (have problem in design the GUI in android)

查看:79
本文介绍了Android布局(在设计Android中的GUI时出现问题)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的CodeProject开发人员!
请给我帮助,当我在android虚拟设备中更改皮肤(例如HVGA,QVGA)时,布局会更改(例如图像向左移动等).

Dear CodeProject Developer!
Please, give me help, when i change the skin (like HVGA, QVGA) in android virtual device, then layout is changed (like image shift to left etc.). what is this,i cann''t understand, how to setup this.

推荐答案

HVGA,QVGA等指的是运行它的设备的分辨率.根据布局的设置方式(如果使用的是absoluteLayouts等),这可能导致它们在不同的分辨率下看起来略有不同.

通过添加大布局文件夹和小布局文件夹,并在每个这些文件夹中添加具有相同名称的视图,为小屏幕,正常屏幕和大屏幕创建不同的布局.然后,Android将找到最合适的布局来为该应用程序当前正在运行的设备充气.

这里有一些有用的文章:
http://blog.stylingandroid.com/archives/category/layouts [
HVGA, QVGA etc refer to the resolution of the device you are running it on. Depending on how you set up your layouts (if you are using absoluteLayouts etc) this can cause them to look slightly different on different resolutions.

Create a different layout for small, normal and large screens by adding folders layout-large, and layout-small etc and adding views with the same name within each of these folders. Android will then find the most appropriate layout to inflate for the device that the application is currently running on.

There are some useful articles here:
http://blog.stylingandroid.com/archives/category/layouts[^]

Hope this helps.


这篇关于Android布局(在设计Android中的GUI时出现问题)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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