2017-09-24 26 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

相关问题