本文介绍了它的布局适合所有Android手机?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开发一个应用程序,现在我在设计阶段。我设计一个屏幕结果
使用线性布局3.7WVGA(歌Nexus One)屏幕蚀。但是当我测试它2.7结果
我有些图标是走在屏幕之外。我的问题是,它的布局是适合所有的屏幕无论我设计它的3.7英寸或2.7上运行它。结果
请给我一个建议。结果
先谢谢了。结果

I am developing one application, right now i am on designing phase. i design one screen
on the 3.7WVGA(Nexus One) screen in eclipse using Linear Layout. but when i test it on 2.7
my some icon are go outside of the screen. my question is that which layout is suitable for all screen whether i design it in 3.7 inch or run it on 2.7.
Please give me a suggestion.
Thanks in Advance.

1日我在2.7 3.7和第二设计它。

1st i design it in 3.7 and second in 2.7.

推荐答案

永远不要曾经 曾经设计一个用于屏幕基于实际屏幕尺寸的Andr​​oid。你将永远拧自己,因为有一百种不同的屏幕在那里。看起来不错的手机上看起来像另一个废话。话虽这么说,这里有一些提示:

Don't ever, ever, ever design a screen for Android based on an actual screen size. You will always screw yourself up because there are a hundred different screens out there. What looks good on one phone will look like crap on another. That being said, here are some tips:


  • 使用的RelativeLayout奠定你的按钮内容了。一旦你了解模型,它比你怀疑容易得多,它会很容易地自动缩放的东西。

  • Use RelativeLayout to lay your button contents out. Once you understand the model it's much easier than you suspect and it will make it easy to automatically scale things.

仅使用实际像素大小的东西,浮动。你永远不希望指定的东西宽度,尽量填充屏幕的宽度。

Only use actual pixel sizes for things that "float". You never want to specify the width of something and try to fill the width of the screen.

包含图像的多种分辨率。让系统为您挑选合适的分辨率。

Include multiple resolutions of your images. Let the system pick the right resolution for you.

一个表/网格布局会让你的东西更容易的整体设计。

A table/grid layout will make things easier for you on the overall design.

按钮的面板巨头都发挥出来。有供您使用其他用户界面选项(菜单按钮,向左和向右滑动屏幕,通过等)。当用户看到按键的领域它看起来像应用程序是拼凑。

Big panels of buttons are played out. There are other UI options at your disposal (menu buttons, swiping left and right through screens, etc.). When users see a field of buttons it looks like the app was slapped together.

这篇关于它的布局适合所有Android手机?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-21 15:30