SetOnItemClickListener() is not working…and its’ because your layout structure is wrong | Akshay Deo
SetOnItemClickListener() is not working…and its’ because your layout structure is wrong
· Akshay Deo
SetOnItemClickListener() is not working…and its’ because your layout structure is wrong
13 Jul 2014
This is gonna be a quick post. I spent like last 45 mins solving a very dumb issue, related to setOnItemClickListener of a custom class extending GridView.
Layout of GridView item:
The issue here is, ImageButton is the part of this view. So whenever onClick event happens, Android system will try to find onClickListener related to ImageButtons in the view. So There are only two solutions to this :