2017-09-24 24 views
1

我試圖在整個應用程序中將圖像b.jpg設置爲背景牆紙。我有如下找不到與給定名稱匹配的資源:android中的attr'windowBackground'

<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar"> 
    <!-- Customize your theme here. --> 
    <item name="colorPrimary">@color/colorPrimary</item> 
    <item name="colorPrimaryDark">@color/colorPrimaryDark</item> 
    <item name="colorAccent">@color/colorAccent</item> 
    <item name="windowBackground">@drawable/b</item> 
</style> 

我得到錯誤做如下圖所示.. Click here to see the image

回答

1

使用此:

<item name="android:windowBackground">@drawable/b</item> 
+0

非常感謝..現在正在工作。 – Yash

+0

@Yash接受和upvote這個答案,如果它是有用的 – shmakova

相關問題