Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save muath-ye/3f739f81ab980a4d1a1fe8d2c3656425 to your computer and use it in GitHub Desktop.
Save muath-ye/3f739f81ab980a4d1a1fe8d2c3656425 to your computer and use it in GitHub Desktop.

Change: launch_background

Path: android/app/src/main/res/drawable/launch_background.xml

Change this:

<item android:drawable="@android:color/white" />

To:

<item android:drawable="@drawable/gradient_background" />

Create: color.xml

Path: android/app/src/main/res/values/colors.xml

Content:

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <color name="gradientstart">#000000</color>
    <color name="gradientend">#FFFFFF</color>
</resources>

Change #000000 and #FFFFFF to your favorite colors


Create: gradient_background.xml

Path: android/app/src/main/res/drawable/gradient_background.xml

Content:

<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
    android:shape="rectangle">
    <gradient
        android:startColor="@color/gradientstart"
        android:endColor="@color/gradientend"
        android:angle="90"/>    
</shape>

Change angle="90" to your preferred angle

Note: this may not work in flutter project

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment