[英]Best way to implement design in Android Application?
I am currently developing an Android Application for a company who are set on having this type of design and targeting Hires devices however I have found that this is very difficult to do and on some hires devices buttons start to stretch.我目前正在为一家致力于拥有此类设计并针对 Hires 设备的公司开发 Android 应用程序,但是我发现这很难做到,并且在某些租用设备上的按钮开始伸展。
Screen design here: https://skitch.com/aaronwardle/r7kwa/screen此处的屏幕设计: https://skitch.com/aaronwardle/r7kwa/screen
A few people have recommended making the buttons into Nine Patch PNG files which help with the various screen layouts.一些人建议将按钮制作成九个补丁 PNG 文件,这有助于各种屏幕布局。
Should I try and get a new app design for this project, which fits all screens using standard controls, or do you think this is achievable?我应该尝试为这个项目设计一个新的应用程序设计,它适合所有使用标准控件的屏幕,还是你认为这是可以实现的?
Looking at stats the most common devices are small screen ones, so creating this application may have a limited audience.查看统计数据,最常见的设备是小屏幕设备,因此创建此应用程序的受众可能有限。
If any one has any pointers on what I could do, ie could I make this for hi res screens and within the application have a different layout for smaller screens?如果有人对我可以做什么有任何指示,即我可以为高分辨率屏幕制作这个并且在应用程序中为较小的屏幕设置不同的布局吗?
Thanks Aaron!谢谢亚伦!
Your question is too generic to give a simple and quick answer.您的问题太笼统,无法简单快速地回答。 Furthermore, the layout you want to make is complex and very non-native-looking which complicates matters.
此外,您想要制作的布局很复杂并且看起来非常非本地化,这使事情变得复杂。 Please make sure you read and understand the official docs on the subject from HERE .
请确保您从这里阅读并理解有关该主题的官方文档。 There is no replacement for that...
没有替代品...
The main points that come to mind from that document are:从该文件中想到的要点是:
<supports-screens>
manifest item <supports-screens>
清单项-small
or -portrait
allows you to create resources that are loaded only on a particular screen aspect, size or DPI.-small
或-portrait
之类的内容允许您创建仅在特定屏幕方面、大小或 DPI 上加载的资源。 For example, you can create bigger images for bigger screens, or change the layout XMLs for portrait or landscape Best practices (as recommended by Google):最佳做法(由 Google 推荐):
I know my answer is a bit generic, but then again, so is your question...我知道我的回答有点笼统,但话又说回来,你的问题也是...
You have to use 9 patch png and also will have to make some changes in the manifest file, to make it screen resolution free.您必须使用 9 补丁 png 并且还必须在清单文件中进行一些更改,以使其屏幕分辨率免费。 These are very less changes in the manifest file so would not be a trouble.
这些是清单文件中非常少的更改,因此不会有问题。
You can use 9 patch images as well as to design application for different resolutions, you can create different layouts for landscape and portrait.您可以使用 9 个补丁图像以及设计不同分辨率的应用程序,您可以为横向和纵向创建不同的布局。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.