简体   繁体   中英

How do I to change the Android Theme of a Xamarin project?

I'm trying to change the Android's theme of a Xamarin project. To do this I'm changing the AndroidManifest.xml adding the clausule <application android:theme="@android:style/Theme.DeviceDefault.Light" android:label="MyApp.Android"></application> and erasing the Theme = "@style/MainTheme" in MainActivity.cs but it just crash and doesn't open the App.

How could I do this ?

Change the Java inheritance from AppCompatActivity to Activity , then you will solve this issue.

Please take a look the following thread for detailed info:

You need to use a Theme.AppCompat theme (or descendant) with this activity

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