Android: Disable highlighting in GridView
Use android:listSelector="#00000000"
in your GridView
element in your XML layout file.
Another option is to reference the transparent color via @android:color/transparent
<?xml version="1.0" encoding="utf-8"?><GridView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/grid" android:layout_width="fill_parent" android:layout_height="fill_parent" android:listSelector="@android:color/transparent"/>
I did the same thing in code using
GridView.setSelector(new ColorDrawable(Color.TRANSPARENT));