Android的屏幕兼容性 [英] Compatibility of android screens

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

问题描述

我在做一个板游戏,董事会旅行周围的物体。在这一点上,我一直在使用绝对布局和电路板设置为我想要的大小和对象上我想要的基板上的位置。我明白了,不过,这不是写这些应用程序的最佳途径。我怎样才能让我的应用程序适用于仍有使得主板我想要的大小,并把一个对象正是我要在黑板上的灵活性,所有的智能手机?我应该为每个屏幕尺寸单独的XML文件(HD,WVGA等等?)?哪种类型的布局你推荐使用?谢谢!

I'm making a game with a board and an object that travels around the board. At this point, I have been using absolute layout and setting the board to the size I want and the object to the position on the board that I want. I understand, however, that this is not the best way to write these apps. How can I make my app suitable for all smartphones still having the flexibility of making the board the size I want and putting an object exactly where I want on the board? Should I make separate xml files for each screen size (HD, WVGA, etc?)? Which layout type do you recommend using? Thanks!

推荐答案

游戏,你应该考虑使用游戏库。

for games, you should consider using games libraries.

流行的图书馆我所知道的2个是 libGdx 并的 AndEngine

2 of the popular libraries i know of are libGdx and AndEngine.

每个人都有自己的优点和缺点。

each has its own advantages and disadvantages.

这是我的经验,LibGdx更难学习和更低水平比AndEngine,但它具有更高的性能和能(即使您自己的电脑),跨平台运行。

from my experience, LibGdx is harder to learn and is more low level than AndEngine, but it has higher performance and can run cross platform (even on your own PC) .

AndEngine是基于LibGdx,所以它得到了它的一些优点,但它是不一样的。

AndEngine is based on LibGdx, so it gets some of its advantages, but it's not the same.

另一种可能的解决办法是学习的OpenGL ES和你自己做的一切。目前,设备的约99%的OpenGL ES的2,所以也许了解它,而不是OpenGL ES的1。

another possible solution would be to learn openGL ES and do everything on your own. currently, about 99% of the devices have openGL ES 2 , so maybe learn it instead of openGL ES 1.

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

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