我想通過主題在我的整個應用程序中更改backgroundColor。這是我的工作,但不成功:如何更改自定義主題Android中的colorBackground?
RES /價值/ styles.xml
<resources>
<color name="bgColor">#FFFFFF</color>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<item name="android:colorBackground">@color/bgColor</item>
<item name="android:windowBackground">@color/bgColor</item>
</style>
</resources>
的Manifest.xml
<application
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
我已經試過這在Android 4.4和5.0 。我究竟做錯了什麼?有什麼建議麼?
謝謝你,這是真的如此愚蠢的錯誤。 – AlexKost
如果那對你有幫助,你能否將這個問題標記爲答案?謝謝。 – AuroMetal