0

I have a View in which I set a list using ListAdapter. Now I want to swipe a View using OnTouchListener, but as soon as I touch the View, the onItemClickListener method gets fired.

I tried adding both OnTouchListener and onItemClickListener to the View but only OnTouchListner seems to be fired. Please help me so that I can swipe the whole View as well as have the ability to to add items to the View on a click.

aLearner
  • 1,051
  • 14
  • 30
Prashant Rane
  • 19
  • 1
  • 10

1 Answers1

1

I think click will not work only touch event will be fired. You can try touch with long click or see links below

Can't handle both click and touch events simultaneously

Or have a look at ViewPager or Android-ViewPagerIndicator

Community
  • 1
  • 1
Androider
  • 2,884
  • 5
  • 28
  • 47