Friday, May 20, 2016

Glowing Pressed Button Part I

This post will gonna show you steps for making a glowing button when pressed... :)
First let's create new project using android studio 2.1...



Next... Let's create our first button...
Then let's create new drawable xml file for default button gradient, right click on drawable folder, choose "New" then "Drawable resource file" as shown in picture below :
Give a name to that xml file :
Then give a code to default_gradient like this :

Nexxt... Add another drawable gradient {pressed_gradient} :
And then button_selector :
Aaaand.... finally we can assign this style to our button... :D
Result.....
Yeeeei... That's the end of part I... :D
Aaand.... You can download above android studio source code here....

Go to Part II....

No comments:

Post a Comment