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 Implementing Designs for Android Using Custom Styles and Themes Creating a Style

adnanalvee2
adnanalvee2
6,862 Points

Android Color, simple Code but not working! Code Challenge task 2/3

Code Challenge: Now add an item element to the style that sets the text color of the button to blue. Hint: Use android:textColor as the attribute name and #0000ff as the hex code for blue.

<resources xmlns:android="http://schemas.android.com/apk/res/android">

  <style name = "RibbitButton" >
    <item name = "android:textColor">   #0000ff  </item>
  </style>
</resources>

What did I do wrong here? Keeps telling me to start the color with a "#". Its already there.

2 Answers

Matheus G Oliveira
Matheus G Oliveira
9,682 Points

Hey,

are you still stucked? ive tried out just arranging the text and it worked

try this

    <style name="RibbitButton">
     <item name="android:textColor">#0000FF</item>
     </style>

<resources xmlns:android="http://schemas.android.com/apk/res/android"> <style name ="TweetButton"> <item name="android:textColor">#0000FF</item>

best answer~~