Closed capella55 closed 7 years ago
Here is the solution.
CarouselViewPager pager = (CarouselViewPager) view.findViewById(R.id.containerViewPager); final GestureDetector tapGestureDetector = new GestureDetector(context, new TapGestureListener()); pager.setOnTouchListener(new View.OnTouchListener() { public boolean onTouch(View v, MotionEvent event) { tapGestureDetector.onTouchEvent(event); return false; } });
class TapGestureListener extends GestureDetector.SimpleOnGestureListener{ @Override public boolean onSingleTapConfirmed(MotionEvent e) { // Here you can do anything you want. return false; } }
I've dropped a PR with this feature, hope the author reviews and accept it !
I'm going to move to next page, when carouselview is clicked. How can I implement this feature?