9

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" />

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>

I want the Theme.NoTitleBar as well.

sundeep
  • 601
  • 1
  • 8
  • 21

2 Answers2

7

I have changed the style below, 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>
</style>

Now my manifest file looks like this:

<application  android:theme="@style/Background"/>
buczek
  • 2,011
  • 7
  • 29
  • 40
sundeep
  • 601
  • 1
  • 8
  • 21
5

You have to use styles to achieve this Check out this link

Create a theme with your background and use that theme.

Rajeev N B
  • 1,365
  • 2
  • 12
  • 24
  • I tried this solution, but following this method would remove the Theme.NoTitleBar which has to be applied and i must add the background image having Theme.NoTitleBar also applied. – sundeep Oct 04 '12 at 07:41