java - How to set android background image -
People here have some code that sets the background color to white, but I want to set an image I want to change the code, but I have to keep the same ID of color so that it can be picked up from the rest code and I have to change it everywhere.
& lt; Color name = "editor_background_color" & gt; ; # ffffffff & lt; / Color & gt;
If you want to get an image from an XML file, you first of all You should include your picture as your project's "editor_background" and get it named in its named folder as your name and get it from your source code:
@ drawable / editor_background For example, if you want to set the background of your activity May include:
android: background = "@ drawable / Adit_baband" I hope it was useful post!
Comments
Post a Comment