androidandroid-listviewhighlighting

Android: disabling highlight on listView click


I want to disable the orange highlight that occurs when touching a listView row. So far in my xml I have tried the following:

android:focusable="false"
android:focusableInTouchMode="false"
android:clickable="false"

More information: I want there to be zero difference when a user touches the screen on this listView object.


Solution

  • Add this to your xml:

    android:listSelector="@android:color/transparent"
    

    And for the problem this may work (I'm not sure and I don't know if there are better solutions):

    You could apply a ColorStateList to your TextView.