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 trialJeff Lichtman
9,752 PointsMy background color is not changing from white in the emulator. It shows in the design, but not the emulator.
Can anyone help?
<?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/activity_fun_facts" android:layout_width="match_parent" android:layout_height="match_parent" android:paddingBottom="@dimen/activity_vertical_margin" android:paddingLeft="@dimen/activity_horizontal_margin" android:paddingRight="@dimen/activity_horizontal_margin" android:paddingTop="@dimen/activity_vertical_margin" tools:context="jltechnologies.funfacts.FunFactsActivity" tools:background="#66bb6a">
1 Answer
Seth Kroger
56,413 Pointstools:background="#66bb6a"
should be android:background="#66bb6a"
Using tools:
will only only show it in Andoird Studio's preview, which is useful if you want to add mock content while you design, but not set it as default content in the app.
Lukas Hölzer
37,349 PointsLukas Hölzer
37,349 PointsThanks for your answer!