I want to set a different background color for a button only while the button is being touched by the user.
But that color remains that way during the whole time onClick for that button is running even though I am no longer touching the button
Please help me find a solution to this
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true" android:color="#777777" />
<item android:color="@android:color/black" />
</selector>