Share via


Android Platform Features

Developing Xamarin.Forms applications for Android requires Visual Studio. The supported platforms page contains more information about the pre-requisites.

Platform-specifics

Platform-specifics allow you to consume functionality that's only available on a specific platform, without implementing custom renderers or effects.

The following platform-specific functionality is provided for Xamarin.Forms views, pages, and layouts on Android:

The following platform-specific functionality is provided for Xamarin.Forms views on Android:

The following platform-specific functionality is provided for Xamarin.Forms cells on Android:

The following platform-specific functionality is provided for Xamarin.Forms pages on Android:

The following platform-specific functionality is provided for the Xamarin.Forms Application class on Android:

Platform support

Originally, the default Xamarin.Forms Android project used an older style of control rendering that was common prior to Android 5.0. Applications built using the template have FormsApplicationActivity as the base class of their main activity.

Material design via AppCompat

Xamarin.Forms Android projects now use FormsAppCompatActivity as the base class of their main activity. This class uses AppCompat features provided by Android to implement Material Design themes.

Here is the Todo sample with the default FormsApplicationActivity:

Todo Sample Application Without AppCompat

And this is the same code after upgrading the project to use FormsAppCompatActivity (and adding the additional theme information):

Todo Sample Application With AppCompat and Theming

Note

When using FormsAppCompatActivity, the base classes for some Android custom renderers will be different.

AndroidX Migration

AndroidX replaces the Android Support Library. To learn about AndroidX and how to migrate a Xamarin.Forms app to use AndroidX libraries, see AndroidX migration in Xamarin.Forms.