开发者

Android compatibility

Here is the thing, I'm developing an application that uses a lot of the screen space, I need to show 3 list views in certain times for example. At first I was testing on my Android 3.1 tablet, but then I decided I wanted to have it playing on Android 2.1 as well. When I tried to play the application the simulator, It looked awfully bad, things much more space on screen then it looked on the 3.1 (even testing it in big screens). Does anyone with experience in this knows if its possible to make an application like my (with lot's of things showing up in the screen at one time) to look good and be compatible to android 2.1?

If its possibl开发者_如何学Pythone, how hard would it be? Should I consider making two different applications?


Here are some example pictures:

Image missing http://dl.dropbox.com/u/2490888/android31.png

Image missing http://dl.dropbox.com/u/2490888/android21.png

The first one is how I want it to look like.


Check out the developer site on supporting different screen sizes, especially the part where they mention this:

res/layout/my_layout.xml             // layout for normal screen size ("default")
res/layout-small/my_layout.xml       // layout for small screen size
res/layout-large/my_layout.xml       // layout for large screen size
res/layout-xlarge/my_layout.xml      // layout for extra large screen size
res/layout-xlarge-land/my_layout.xml // layout for extra large in landscape orientation

Basicly you should be able to solve your problem by rearranging your layouts depending on screen size.


EDIT

If you don't have time to fit your layouts you could look into Fragments. I haven't worked with them that much myself, so I can't really give you any pointers on how best to use them, but from what I read in the documentation they might serve a purpose in your situtation.


Make different xml layout as per different range of devices and put them in different folder of layouts. For example if you have main.xml as your layout file designed for tablet, put it in layout-xlarge for tab devices and other version of main.xml which is compatable with handset like galaxy s2 you out it in layout folder and for smaller devices like galaxy pop you put main.xml which is designed for smaller devices in layout-small folder.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜