tags:

views:

31

answers:

0

If I have a view, such as a button, that I want to change the background animation that occurs on longPress how do I do that. By default on stock android it fades out from orange. I assumed it's just an alpha transition so I thought that by changing the background of the component I would get this affect for free. For example, I assumed if I changed the background to a selector with the color blue for states of pressed and selected and transparent for all other states, it would fade from blue to whatever is the window color. However as soon as I set a custom selector as the background, there is no such fade affect at all for a long click.

Does anyone know how to change the background of a widget and still attain this affect to signify a long press is possible?