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 trialM BILAL AFZAL
204 PointsAndroid studio
can anyone tell me I am using the phone for testing my app in the android studio but on the android studio preview is ok but when I am run the app on the phone the background color and text color does not change can anyone help me, please .
1 Answer
Jonathan Grieve
Treehouse Moderator 91,253 PointsIt sounds like you're using a namespace in your XML that only targets changes in your android preview. You're probably using the tools namespace in your XML.
Try changing this to say android.
<GridLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
tools:targetApi="14" >
https://developer.android.com/studio/write/tool-attributes
This should then force your device to show your changes.