How to get Holo Light theme working in my Xamarin application

前端 未结 2 645
故里飘歌
故里飘歌 2021-02-06 11:24

I\'m trying to get my app to use the Holo.Light theme. I\'ve created a custom theme for Holo and put it in

Resourses\\values-v11\\FsmTheme.xml

2条回答
  •  野性不改
    2021-02-06 11:55

    You can use Attributes to modify values in the AndroidManifest.xml, for example this changes the theme to holo light:

    [Activity(
        Label = "Foobar",
        MainLauncher = true,
        Theme = "@android:style/Theme.Holo.Light"
    )]
    public class MainActivity : Activity { ... }
    

    You can also do this at the Application level.

    But for your specific problem, it seems that you are naming your style files FsmTheme.xml. That is incorrect. You must name any styling resources styles.xml, so if you rename your files to Resources/values/styles.xml and Resources/values-v11/styles.xml everything should work as expected.

提交回复
热议问题