所以我试图为我的 android 应用程序使用统一的自定义主题,想法是在应用程序加载时(在统一徽标之前)更改颜色(甚至添加图像),因为一些低端设备正在使用最多 10 秒来显示启动画面,而 10 秒的黑屏只会让应用看起来像是坏掉了。
到目前为止,我的 android 清单有:
android:theme="@style/CustomTheme"
Run Code Online (Sandbox Code Playgroud)
我有另一个带有样式的文件:
<resources>
<style name="CustomTheme" parent="@android:style/Theme.Material.NoActionBar.Fullscreen">
<item name="android:windowBackground">@drawable/editor_bg</item>
</style>
</resources>
Run Code Online (Sandbox Code Playgroud)
每当我更改样式的父项时,对 Theme.Translucent.NoTitleBar 说,我会看到更改,我的应用程序会删除黑屏,因此我知道样式已更改/使用。
我的问题是 @drawable/editor_bg 似乎根本不起作用,我什至尝试使用颜色而不是在另一个文件中定义的带有 @color/white 的图像。
不确定这是统一本身的问题(使用 5.3.1 个人版)还是在 android 方面遗漏了一些东西。任何帮助表示赞赏。
android unity-game-engine android-manifest android-theme android-styles