Search code examples
androidgoogle-gdk

Glass GDK:Change Color of Static/ Immersion Cards


I am trying to change the color of the text on a static/immersion card related to medical alerts. Such that an allergy is shown in red and bold colors and is easily noticeable. Is there a way to do this in Glass GDK as the card.SetText() method just takes a String as its parameter and the card is given a layout before.


Solution

  • The GDK Card class does not have functionality to alter the color of text, reference here: https://developers.google.com/glass/develop/gdk/reference/com/google/android/glass/app/Card

    However, you can alter text color in your style. Add a line in res/values/styles.xml within your <style> object

    <item name="android:textColor">#00FF00</item>
    

    More information on styles and themes here: http://developer.android.com/guide/topics/ui/themes.html