I Have a GrinView
with costum Adapter
that defines some ImageViews
and set onClick
event. When the user clicks the buttons it show some orange background, as the iimage bellow. How can I avoid this background display?
Asked
Active
Viewed 55 times
0

LeeNeverGup
- 1,096
- 8
- 23
-
Apply logic found here http://stackoverflow.com/a/5727845/771072 – linakis Oct 30 '12 at 13:40
-
@Bororo I tried to use `setBackgroundResource` with my own selector, but the orange backgrounnd still there. – LeeNeverGup Oct 30 '12 at 13:52
1 Answers
0
Try setting
android:background="@null"
in your layout xml.
Are you sure you are using a ImageView with onClickListener? If you are using an ImageButton, try changing it into a ImageView (that doesn't bring onClick-animation).
Cheers

Florian Barth
- 1,392
- 12
- 25
-
I'm actually declaring the `imageView` via code, I sure i use `imageView `(actually with onItemClickListener) and `setBackgroundResource(0)` does not help. – LeeNeverGup Oct 30 '12 at 14:01
-
1ok, then the onClick-behaviour might be coming from your GridView. Try setting android:listSelector="#00000000" (transparent selector) in the layout of your GridView. – Florian Barth Oct 30 '12 at 14:04