I want to customize my textview when pressed will look like this how to do that ?

I want to customize my textview when pressed will look like this how to do that ?

Create a ripple_effect.xml file and add following code. res/drawable/ripple_effect.xml
<?xml version="1.0" encoding="utf-8"?>
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:color="#f816a463"
tools:targetApi="lollipop">
<item android:id="@android:id/mask">
<shape android:shape="rectangle">
<solid android:color="#f816a463" />
</shape>
</item>
</ripple>
see the link : http://www.viralandroid.com/2015/09/how-to-add-ripple-effect-to-android-button.html implement it in your code where you want to add effect.
<?xml version="1.0" encoding="utf-8"?>
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
android:color="yourcolorcode">
<item
android:id="@android:id/mask"
android:drawable="@android:color/white" />
</ripple>