I am freshers in android, and i want to change background color of an activity
My XML code is bellow…
<?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context="com.example.naomi.MainActivity"> </RelativeLayout>
This is very simple, just you set
android:background="#3f6270"
in your xml “RelativeLayot”.
Your Code look like this…..
<?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context="com.example.swapan.yesuus.reset_password" android:background="#3f6270"> </RelativeLayout>
Question and answer is powered by AnsPress.io