Yesterday I spent a lot of time trying to find a way to apply the ListView item highlight effects to a TextView, without any luck.
I first tried it by creating a custom selector in XML, but couldn’t find a way to retrieve the system default colors of different states in order to apply them in my custom selector drawable that I was afterwards assigning to the TextView, by setting it to its backgroundDrawable. But the solution could be “easily” found in the documentation. I navigated to the ListView documentation and I found an XML attribute of the View named listSelector as well as the corresponding setter and getter methods. In the end of the listSelector attribute description there is a mention of the listSelector global attribute resource symbol listSelector. So, here is the answer. Why not use the global listSelector, which is used by default by every ListView widget?
In my TextView configuration, I set the background attribute to the system resource of the list_selector_background:
Hope this will help people trying to do the same thing!