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 trialJillsvick Kuri
3,002 PointsThe color of the text in my button doesn't change when I press it. It keeps being green :(
My app works and I coded along with the teacher but the only issue is at the end, when I change the color of the text in the button, I change it to the same color as the relative layout but when I save and run I see the color of the text in the button keeps being green. It doesn't change :/
1 Answer
poltexious
Courses Plus Student 6,993 PointsIt can be quite difficult for other members if you do not provide any code.
Did you remember to set the text color on the fact button (in the overrode OnClickListener method which is a part of the onCreate method)? That is:
showFactButton.setTextColor(color);
Try to provide some code that you are suspicious about.
Jillsvick Kuri
3,002 PointsJillsvick Kuri
3,002 PointsThank you so much! It seems I didn't follow that part of the video (5:30) :S my code lacked that single line so that's why the text color didn't change :)
poltexious
Courses Plus Student 6,993 Pointspoltexious
Courses Plus Student 6,993 PointsI am glad it worked out for you! :-)