created background_light.xml:
`
<gradient
android:angle="270"
android:endColor="@color/clr_theme_indigo"
android:startColor="@color/clr_dashboard_toolbar"
android:type="linear" />
`
background_dark.xml
`<?xml version="1.0" encoding="UTF-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<gradient
android:angle="270"
android:endColor="@color/black"
android:startColor="@color/black"
android:type="linear" />
<corners
android:bottomLeftRadius="@dimen/_5sdp"
android:bottomRightRadius="@dimen/_5sdp" />
</shape>`
How to combine both the xml file apply activity_main.xml:
android:background=”@drawable/background”
like this
1