How to make blink effect on textview on click?

android, onclick, textview

Solution

The easiest way is to set this background in the TextView:

 android:background="?attr/selectableItemBackground"

And if you want to set a different color for the background, set that attr as `foreground` instead of `background`.

Problem

Hi I am new to android development. I want to create onclick effects to textview. When I click on the textview it will blink or something effects make. I tried it with change color, but it's not working. How can I make blink effect on textview onclick ?? please help me with example code. thanks in advance :)

Original source