I've got a view which has an onClickListener
, when the user clicks at a certain position I'd like to query the database and then pull data from it. Problem is I can't seem to do this in a view class because it's not an Activity.
I've tried implementing an OnTouchListener
over the Layout in the Activity but it seems the view's layout overrides any attempt to get a touch registering from there.
So, I've tried a few approaches and they've failed. I'm wondering do any of you guys have any ideas? How would I implement it so that when the user touches the screen, I can retrieve the X Y values and then query the database?