Home > Mobile >  ListView onItemClick with Item sliding events conflict, what should I do?
ListView onItemClick with Item sliding events conflict, what should I do?

Time:10-09

Problem:
Set up for ListView onItemClick events, events in the Item set up onTouchEvent
Returns true if the Item ACTION_DOWN, the Item about the slide will respond, but set in the ListView onItemClick could trigger;
If return false in the Item of ACTION_DOWN, sliding unable to response of the Item, but in a ListView onItemClick can trigger Settings;

Consult everybody a great god, and how to deal with, can trigger Item ACTION_MOVE let his fingers slide, slide not triggered when ListView onItemClick?

CodePudding user response:

Don't use the ListView onItemClick, onTouchEvent monitor each Item in the Item, and then his judgment is click or slide, then the callback,
  • Related