构建用于升级Froyo,造型为ICS [英] Building for Froyo, Styling for ICS

查看:154
本文介绍了构建用于升级Froyo,造型为ICS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我打算写一个应用程序,并针对建筑升级Froyo 2.2(API等级8)。不过,我想的4.0 ICS应用的用户体验与ICS用户界面的应用程序。

I'm planning on writing an app and building against 2.2 Froyo (API Level 8). However, I want app users of 4.0 ICS to experience the app with the ICS user interface.

目前我的做法是有我的应用程序意义上的默认活动的Andr​​oid设备的版本。

Currently my approach is to have the default activity of my app sense the version of the Android device.

如果是小于4.0,使用姜饼和Froyo的书面XML意见,如果是4.0或更高版本才能使用ICS XML视图。然而,这似乎有点杂乱无章,我不知道我能有效管理的意见版分离。

If it is less than 4.0, use XML views written for Gingerbread and Froyo and, if it's 4.0 or higher to use ICS XML views. This however seems a bit haphazard and I'm not sure I can manage the separation of version views effectively.

什么样的​​方法,工具和想法,我可以用它来帮我做我的应用程序?它甚至东西,我需要考虑?是我上面正确的观点分离的想法?我是否有替代品,我可以改用?

What approaches, tools, and ideas can I use to help me make my app? Is it even something I need to consider? Is my idea of the view separation above correct? Do I have alternatives I could use instead?

干杯!

推荐答案

如果你只是想针对不同的操作系统版本适用于不同的资源,可以让系​​统为你做它把你的资源投入到不同的资源文件夹中的V 限定符。如用于升级Froyo布局布局-V8文件夹和布局V14为用于ICS布局。我没有尝试这一点,但在文件的,这就是它假设做。

If you just want to apply different resources for different OS version, you can let system do it for you by putting your resources into different resource folders with the "v" qualifer. Such as "layout-v8" folder for layouts used for Froyo and "layout-v14" for layouts used for ICS. I did not try this but from the document, that's what it supposes to do.

这篇关于构建用于升级Froyo,造型为ICS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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