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

elton mutasa
elton mutasa
1,831 Points

how to change background color

how can i change the entire background color of The Relative Layout to dark using this code #fff092b0 in xml view

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/#fff092b0" >


  <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="@android:color/white" /> 



    </RelativeLayout>

1 Answer

KRIS NIKOLAISEN
PRO
KRIS NIKOLAISEN
Pro Student 50,936 Points

You don't need @android:color/ just the hex value