Roland Deschain
Roland Deschain

Reputation: 2840

Xamarin.Android - Can you set your custom theme in the Visual Studio 2019 Android UI designer?

I'm playing around with styles and themes in my hello world android app: enter image description here

For this I have a custom style as follows in my styles.xml file:

<style name="Theme.AppTheme.Custom" parent="@style/Theme.AppCompat.NoActionBar">
    <item name="android:windowNoTitle">true</item>
    <item name="android:windowActionBar">false</item>
    <item name="android:windowFullscreen">true</item>
    <item name="colorPrimary">@color/colorPrimary</item>
    <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
    <item name="colorAccent">@color/colorAccent</item>
    <item name="android:textColor">@color/colorText</item>
    <item name="android:colorBackground">@color/colorBackground</item>
</style>

My UI designer still looks different from my custom style, I have the option to change themes, but my custom theme is not in the list:

enter image description here

Is there a way to add custom themes to the UI designer...or even better to just let it display the same way it will eventually look in the endproduct?

Upvotes: 0

Views: 508

Answers (1)

Leo Zhu
Leo Zhu

Reputation: 14981

The Theme drop-down menu displays all of the themes defined in the project

So it will add your custom theme to the theme list,but you need close the Visual Studio and restart it,then you could see your custom theme inside the theme list.

And you also could creat the custom theme by using Theme Editor

enter image description here

Upvotes: 1

Related Questions