Set background image for whole application in android

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

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

Now it has been implemented from the themes of the android package.

Now I want to add a background image to my entire application, how can I do this.

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

I also want Theme.NoTitleBar.

+6
source share
2 answers

I changed the style below by doing this, I redefine 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"/> 
+3
source

You must use styles to achieve this. Check the link.

Create a theme with your background and use this theme.

+4
source

Source: https://habr.com/ru/post/926914/


All Articles