I have a ViewPager inside every row of a ListView. It works fine, it changes the views inside it when the user use the swipe gesture, but it prevents the ListView\'s onItemC
The idea is to do the click listener on the view pager and not the listView
When adding the viewPager in the getView method, set its tag to be the position of the row
holder.viewPager.setTag(position);
Then add the click listener to the viewPager (also in getView)
viewPager.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
int position = v.getTag();
Log.d(TAG, "onItemClick: " + position);
//Fire a delegate or notification of whatever you want to do on the item click. You now have the position
myClickListener.onItemClicked(position);
}
});