Monday, September 27, 2021

Background Color change in Android

 


Xml Page:-


<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<gradient android:startColor="#6907DA"
android:endColor="#1240EA"
android:centerColor="#611A6E"/>

</shape>

Xml:-
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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"
android:padding="20dp"
android:background="@drawable/background"
android:orientation="vertical"
tools:context=".MainActivity">



</LinearLayout>



No comments:

Post a Comment

Activity Navigation One Activity to another Activity

Main Activity :-   <? xml version ="1.0" encoding ="utf-8" ?> < RelativeLayout xmlns: android ="http://sch...