Skip to content
This repository has been archived by the owner on May 24, 2022. It is now read-only.

How to set start and end color to Gradient view? #40

Open
vikas-markk opened this issue Jan 22, 2021 · 1 comment
Open

How to set start and end color to Gradient view? #40

vikas-markk opened this issue Jan 22, 2021 · 1 comment

Comments

@vikas-markk
Copy link

No description provided.

@TusharKrSoniTKS
Copy link

1)Make a new xml file by making a new resource file in the Drawable section. Now use this code in the file

<gradient
    android:startColor = "#F40303"
    android:centerColor = "#055798"
    android:endColor = "#00FF0C"
    android:angle = "90"
    android:type = "linear" />

2)Set the colours that you want for your gradient file.
3) Now add the file to the background of the particular xml view file.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants