我有一个首选项 xml Activity ,其中有一个用于打开和关闭声音的复选框,以及一个供用户输入他/她的名字的编辑框。有没有办法使首选项 Activity 全屏并设置背景?如果可能的话,我想设置自己的 png 背景。谢谢。
最佳答案
使用主题并设置android:theme="@style/CustomTheme"
在你的<activity>
创建 CustomTheme
在您的 styles.xml 中包含以下项目
<style name="CustomTheme">
<item name="android:windowBackground">@drawable/backgroundimage</item>
<item name="android:windowFullscreen">true</item>
</style>
关于java - 如何更改首选项 Activity 的背景?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15260663/