setting textColor in TextView in layout/main.xml main layout file not referencing colors.xml file. (It wants a #RRGGBB instead of @color/text_color)

前端 未结 4 1640
一向
一向 2020-12-14 00:10

I\'m trying to set some general colors for a program I\'m writing. I created a colors.xml file and am trying to directly reference the colors from the layout.xml file. I bel

4条回答
  •  别那么骄傲
    2020-12-14 00:28

    You should write textcolor in xml as

    android:textColor="@color/text_color"
    

    or

    android:textColor="#FFFFFF"
    

提交回复
热议问题