How to gradient fill a button's background?
Posted
by Samuh
on Stack Overflow
See other posts from Stack Overflow
or by Samuh
Published on 2010-03-08T11:47:19Z
Indexed on
2010/03/08
11:51 UTC
Read the original article
Hit count: 319
android
|android-ui
I have to create a colored button with gradient fill(starting from the middle of the button along Y axis). If I set the background property of the button to the color I want, I lose the rounded look and feel of a button and also the gradient fill(It looks like a TextView
with a background).
Also, I want this color to change when the user depresses the button. Can i specify this via selector XMLs(Color State Lists)?
Any tutorials or links that can help me here is appreciated.
Thanks.
© Stack Overflow or respective owner