简体   繁体   中英

Which are the most important features I will miss targeting Android API 3 (OS 1.5) instead of most recent API?

I'm beginning with Android development. I'm aware that there is a lot of Android devices still on OS 1.5 or 1.6 so I'm thinking about require API level 3 as minimum to support them.

What will I miss from 2.2?

You can make your app backward compatible. You will have to specify the target SDK as 2.2 and the min SDK as 1.5

There are a few strategies to use when you are making a backward compatible application. The thing you need to avoid is using functionality from a higher SDK (APIs etc) when your application is running on a phone that supports a lower SDK. Read http://developer.android.com/resources/articles/backward-compatibility.html for more information.

Another good read on how lazy loading of classes can be used for backward compatibility - http://android-developers.blogspot.com/2010/07/how-to-have-your-cupcake-and-eat-it-too.html

The thing I miss the most when I target Android 1.5 is a usable RelativeLayout . 1.5's implementation of RelativeLayout is famously buggy and often requires you to use all sorts of awkward workarounds and extra view nesting that can be avoided on Android 1.6+. For instance, the layout_center* properties rarely work properly on 1.5, and they're one of the most useful features of RelativeLayout.

添加到此列表中缺少 1.5 布局架构中的“onClick”属性

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM