Alan2
Alan2

Reputation: 24592

What's a non app compat Xamarin application?

I am looking at this issue which is effecting me:

https://github.com/xamarin/Xamarin.Forms/issues/3087

It mentions that this is a problem with a

Steps to Reproduce

Just use a switch on a non app compat application

But what's a "non app compat application"

Also does anyone know any more about the history of this problem. Is it just for Switch or for many other elements. Which version of Android is causing it? Looks like a big problem for anyone using an Android custom renderer.

Upvotes: 0

Views: 62

Answers (1)

gannaway
gannaway

Reputation: 1882

Here's an explanation from the docs:

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

The sample project referenced in the github issue inherits from FormsApplicationActivity (non AppCompat):

public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsApplicationActivity

The docs also mention that modern projects use 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.

Upvotes: 1

Related Questions