如何设置Android应用的背景是什么? [英] How to set the background of the android application?
本文介绍了如何设置Android应用的背景是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我开发一个Android应用程序,我想改变窗口的背景
I developed one android application in that i want to change the background of the window
现在是提供黑色,我想改变这种状况的一些图片或主题
Now that is available in black i want to change that with some images or themes
在此先感谢
推荐答案
继@Ryan:
在您的活动的布局,你还可以添加属性
In the layout for your activities, you can also add the attribute
android:background="@android:color/white"
要设置背景颜色。您也可以引入一个自定义资源 /res/values/colors.xml
中,你可以声明自定义颜色。一个这样的文件可能是这样的:
to set a background color. You can also introduce a custom resource /res/values/colors.xml
in which you can declare custom colors. One such file might look like:
<resources>
<color name="fire_brick_red">#B0171F</color>
</resources>
您再在XML介绍这些如下:
You then introduce these in XML as follows:
android:background="@color/fire_brick_red"
这篇关于如何设置Android应用的背景是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文