设置活动背景主题使用的风格?背景、风格、主题

2023-09-06 01:34:32 作者:不改变是受苦

我想用一个背景绘制为我所有的活动。如何才能做到这一点的,风格呢?

I want to use a background drawable for all my activities. How can I do this with a style?

// styles.xml
<style name="MyTheme" parent="Theme.Sherlock.Light.DarkActionBar.ForceOverflow">
    <item name="android:background">@drawable/my_background</item>  
</style>

这是设置背景,似乎所有的部件。我只是希望它的工作的活动。

that sets the background for all widgets it seems. I just want it to work for activities.

感谢

推荐答案

使用

<item name="android:windowBackground">@drawable/my_background</item>