标签图标API 3级和大于之间的兼容性; = 5 [英] Tab icons compatibility between API level 3 and >=5

查看:117
本文介绍了标签图标API 3级和大于之间的兼容性; = 5的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的应用程序使用标签和它是建立在SDK级别3(Android 1.5的)。

My application uses tabs and it is built on top of SDK Level 3 (Android 1.5).

谷歌提到,标签图标的Andr​​oid 2.0彻底改变,所以他们建议制作两套图标,一个为< 5级,另一个为> = 5级,并设置的android:targetSdkVersion 来在应用程序清单5(见的 http://developer.android.com/guide/practices/ui_guidelines/icon_design_tab.html )。但这种属性在API级别4中引入的,所以没有办法来声明,因为我对API级别3(见的http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#target).

Google mentions that tab icons "changed drastically" in Android 2.0, so they recommend making two sets of icons, one for < level 5 and another for >= level 5, and set the android:targetSdkVersion to 5 in the application manifest (see http://developer.android.com/guide/practices/ui_guidelines/icon_design_tab.html). BUT this attribute was introduced in API Level 4, so there is no way to declare it because I'm on API Level 3 (see http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#target).

什么是处理这种情况的正确方法?

What's the proper way to handle this case?

推荐答案

开发code处第3级(保证不使用后来被引入的API)后,目标级别更改为5或更高,修补清单。 code编译近期目标将只要code只使用3级API调用上的3级设备上运行。您还可以使用-V5中的名称添加资源文件夹放平> = 5个图标。

After developing the code at level 3 (to guarantee that you aren't using APIs that were introduced later), change the target level to 5 or higher and patch up the manifest. Code compiled for more recent targets will run on level 3 devices as long as the code only uses level 3 API calls. You can also add resource folders with "-v5" in the name to put the level >= 5 icons.

这篇关于标签图标API 3级和大于之间的兼容性; = 5的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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