[mono-android] API version compilation benefits
goncalo at minkan.net
Wed Apr 4 16:26:16 UTC 2012
That's what I thought... I am currently targeting API 10 (2.3.3) and using
the compatibility libraries (to be able to use fragments and a few more
goodies). The ugly issue I'm already resolving by specifying different
layouts for different screens. Seems like the right choice taking in
account the version fragmentation share in the market.
Thank you for clarifying this to me Jon
On 4 April 2012 17:06, Jonathan Pryor <jonp at xamarin.com> wrote:
> On Apr 4, 2012, at 6:41 AM, Goncalo Oliveira wrote:
> > Can anyone tell me if and what are the advantages of compiling an app
> for a higher version?
> The advantage to targeting a higher version is that you can access and use
> types and members added in that API version, e.g. to use Fragments you need
> to target API level 11+ (Android v3.0+). If you're not using those types
> and members, there is no advantage to targeting a higher API level.
> Furthermore, your 2.3.3 build will run w/o issue  on higher API level
> devices (tablets, Android v4 devices). The reverse -- running a 3.1 build
> on a 2.3 device -- will very probably fail in obscure ways .
> If you want to support both existing API10 phones and tablets and the
> forthcoming ICS phones, you'll need to think about what you want in terms
> of "support":
> - Run? Targeting API 10 will run on all API10+ devices.
> - Run + Look good? You'll need some flavor of target-specific UI. This can
> be done either via separate layout files [0, 1, 2], through multi-APK
> support  (build one .apk for API10, build another for API 12, etc.), or
> through use of the compatibility libraries. Unfortunately, easy use of the
> compatibility libraries will need to wait for the forthcoming 4.1.0 alpha
> - Jon
>  One "issue" is that running a phone UI on a tablet results in a fugly
> UI. This can be rectified by providing tablet-specific UI .axml files [1,
> 2], e.g. via Resources\layout-xlarge\MyLayout.axml
>  http://developer.android.com/guide/practices/screens_support.html
>  http://lists.ximian.com/pipermail/monodroid/2011-November/007350.html
> Monodroid mailing list
> Monodroid at lists.ximian.com
> UNSUBSCRIBE INFORMATION:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Monodroid