设置活动背景主题使用的风格? [英] Set activity background in theme using a style?

查看:213
本文介绍了设置活动背景主题使用的风格?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

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>

这篇关于设置活动背景主题使用的风格?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆