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 Build a Simple Android App Creating the Screen Layout Setting a Fullscreen Theme

Lahiru Vikum Thamel
Lahiru Vikum Thamel
316 Points

what is the difference between 'android:background="" ' & 'tools:background="" ' ?

what is the difference between

1)android:background="@android:color/holo_green_light"

    and

2)tools:background="@android:color/holo_green_light"

when it is first one, color appeared to the background. But when it is second, color doesn't appear. What is the purpose of the second one?

1 Answer

Seth Kroger
Seth Kroger
56,414 Points

android:background will set the background in the app, tools:background will only set it in the design editor/preview. tools: is useful to set a placeholder or dummy text/value to help visualize the design better if the text/value is completely dynamic in the app itself.