Android: Onclick Not Working
I'm doing in my app a ImageAdapter and i want that click on the image below the textview is hidden. But setInvisibility not work. El problem is nothing works with info. Is there a
Solution 1:
info is a member variable of your adapter and isn't necessarily the same view that was clicked - you overwrite the variable for each item.
onClick() comes with the View v argument which is the view that was clicked - call setVisibility() on it.
Also, invisible is a member variable with the same problems as above. Call v.getVisibility() if you want to examine the current visility of your view.
Solution 2:
Use ImageView's (imgDisplay) type in .java class as ImageView instead of TouchImageView
Post a Comment for "Android: Onclick Not Working"