Adding Curves and Gradient Colors to Android Views Has Never Been Easier— Android Studio Tutorial (Using XML Only)
One of the main selling point of your app is it’s UI and plain one ole raw and views don’t cut it when you trying to create an eye catching app.
So today i will be showing how to create and apply curves and gradient colors to an Android in 3 Steps.
1. Create A Drawable File by Right Clicking the Drawable Folder.
2. Create 3 tags: <selector> <item> <shape> as shown in photo and within <shape> you define your attributes like
<corners> To Define Curves at The Corners of the View
<stroke> Outer Layer Line as shown in No 2 in First Photo
<solid> Define 1Color You will like to use for your views
<gradient> Defines 2 to 3 colors your will like to use on your views hence creating a gradient.
And lots more but these are the 4 we will be using for this Tutorial.
Example 1:(From Image 1 After Heading)
Example 2:(From Image 1 After Heading)
Example 3:(From Image 1 After Heading)
3. Set your newly created drawable as the background to the view you want to modify.
And Tada!!! 🎉 🎊 There Your Have It Your Custom Curved Drawable 😉 😀 with a fancy gradient to play around with.If you found this helpful clap, share, follow to stay in the Loop. 👍