- Home /
How to override the default style.xml for a fullscreen android app?
I am trying to override the default style.xml provided my Unity in my android build without first exporting an Android Studio project. I have tried putting a style.xml in the Plugins/Android/res folder, as well as exporting an .aar library with the style as discussed here but even when naming my style the same as the one used by Unity, I cannot get the result I want. Unity always uses the one it creates.
Answer by bencoPB · Nov 30, 2018 at 03:33 PM
Just putting my solution out there for anyone who runs into the same issue. I had forgotten that I could specify the style in the manifest.xml. If you are using a custom manifest (or, if not, you can make one and include it in the Plugins/Android folder) You an edit the line that looks like <application android:theme="@style/UnityDefaultStyle" android:icon="@mipmap/app_icon" android:label="@string/app_name" android:usesCleartextTraffic="true" android:isGame="true" android:banner="@drawable/app_banner">
you can replace the UnityDefaultStyle with your own style, which you can specify in your styles.xml in the line that looks like <style name="YourStyleNameHere" parent="android:Theme.Material.Light.NoActionBar.Fullscreen">
Hope this helps someone.