I am currently integrating the FlipView library (https://github.com/emilsjolander/android-FlipView) in my Android app. I absolutely need to enable onClick, but it doesn't work the way it worked with ListView. I know I will need to adapt FlipView, but I don't really know how.
This is the code I've been using so far to handle onClick events:
@Override
public void onListItemClick(FlipView listView, View view, int position, long id) {
if (id >= 0) { // should not happen, but I had a crash with this on PlayStore...
startActivity(new Intent(Intent.ACTION_VIEW, ContentUris.withAppendedId(mUri, id)));
}
}
Could someone help me? Any help will be greatly appreciated!!!
Thanks
Why not implement a viewHolder in the adapter and get the roo element and set the onclick listener to that?