Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Android

About " Build a Simple Android App" how i can do back ground photo instead of color ?

About " Build a Simple Android App" how i can do back ground photo instead of color ?

Samuel Moisan
Samuel Moisan
11,953 Points

Hi Yogev,

You need to add your photo in the Drawable folder, then in the "root" layout of your app use the background propriety and assign your photo for the value.

2 Answers

Samuel Moisan
Samuel Moisan
11,953 Points

Hi Yogev,

If I give you the code you will not learn. I suggest you to follow these course: Beginner android development and then if you get stuck come ask help. You will learn all the thing you need to replace the color background with a photo and change the background when the user click on a button.

i on my "root" layout but what is background propriety and assign your photo for the value. ( i steel new ) and when they click on the buttn the background will change photo ( when the click new photo ) now its colors