Android Build a Simple Android App Creating the Screen Layout Setting Colors

how to change the tex tcolor in coding

how i can change the text color

activity_main.xml
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  android:background="@android:color/white" >

  <TextView
    android:id="@+id/textView1"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_centerHorizontal="true"
    android:layout_centerVertical="true"
    android:text="Treehouse loves me!"
    android:textSize="72sp" />
    android:textcolor="white" 

</RelativeLayout>

1 Answer

Lay Durafé
Lay Durafé
4,826 Points
         android:textColor="@android:color/white"

Also make sure that your /> is positioned after the above code.

Your TextView design properties currently end after you described what you want the text size to be

         android:textSize="72sp" />

thank you