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 trialMohammed Safiulla D
17,927 PointsIs there is any way to set the checkboxes to different colors in Options Menu?
This question is regarding Create an Options Menu Workshop. As all the checkboxes are in Pink color, I was wondering if there is any way for the menu items (with checkboxes) to have different colors; so that red checkbox can be in red color and the same for blue and green?
1 Answer
Tonnie Fanadez
UX Design Techdegree Graduate 22,796 PointsI think you can do that using XML
<android.support.v7.widget.AppCompatCheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:buttonTint="@color/COLOR_HERE" />```
Mohammed Safiulla D
17,927 PointsMohammed Safiulla D
17,927 PointsThank you for your answer this works in layout file but I can't apply this to a menuItem, I want to have the checkboxes in the Options Menu in different colors. so I tried adding buttonTint but it didn't work: