设置背景图像在Android的整个应用程序 [英] set background Image to whole application in android

查看:312
本文介绍了设置背景图像在Android的整个应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想设置背景图片为我的Andr​​oid应用程序。所以,我的应用程序已经有一个主题,我喜欢这个清单文件设置

I want to set background image to my application in android. So my application already has a theme set in my manifest file like this

 <application   android:theme="@android:style/Theme.NoTitleBar" />

现在这是从Android包的主题实现的。

Now this was implemented from the themes of android package.

现在我想一个背景图片添加到我的整个应用程序我怎样才能做到这一点。

Now i want to add a background image to my entire application how can i do it.

<style name="Theme.NoTitleBar.BackgroundImage">
    <item name="android:background">@drawable/bitzer_background</item>
</style>

我要Theme.NoTitleBar为好。

I want the Theme.NoTitleBar as well.

推荐答案

我已经改变了风格做这个我重写Theme.NoTitlteBar如下:

I have changed the style as follows by doing this i am overriding the Theme.NoTitlteBar

 <style name="Background" parent="@android:style/Theme.NoTitleBar">
<item name="android:windowBackground">@android:color/black</item>
<item name="android:windowNoTitle">true</item>


现在,清单文件看起来是这样的。

Now manifest file looks like this.

<application  android:theme="@style/Background"/>

这篇关于设置背景图像在Android的整个应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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