Xamarin.Forms - FormsAppCompatActivity或ForsmApplicationActivity

时间:2017-07-12 07:42:12

标签: c# android xamarin.forms

我是Xamarin.Forms的新手,我无法在Android项目中找到有关global :: Xamarin.Forms.Platform.Android.FormsApplicationActivity和global :: Xamarin.Forms.Platform.Android.FormsAppCompatActivity之间的不同信息。有人可以解释这两个类之间的差异吗?

1 个答案:

答案 0 :(得分:0)

Currently you most likely should be using FormsAppCompatActivity. This is an Activity suitable to using Material Design on Android. It wasn’t until the introduction of the updated AppCompat v7 Support Library that devices running earlier versions of Android could use Material Design. Switching to FormsAppCompatActivity enables you to use these features.

It has been around since Xamarin.Forms 1.5 and seeing as how we're at 2.3.4 currently you are most likely better off using FormsAppCompatActivity going into the future.