=============== Problem description ====================
It is similar to the chat interface in QQ. The listview item has no selected effect, but the textview in the item can be selected. How can this problem be achieved ??
Help...
============= Solution 1 ======================
In the layout file, set listview Android: listselector = "@ Android: color/translate" to make the background transparent when being clicked. In this way, the effect listview cannot be selected.
Then you click the button. At this time, the background of the listview will not become ugly yellow. You just need to handle the button click or long-press event.
============= Solution 2 ======================
Add
@ Overridepublic Boolean isenabled (INT position) {return false ;}
In this way, the item will not be selected.
Then add a listener to the control that you want to have a click effect.
How to Make listview unavailable? The button in listview can be selected