2

I'm getting the following suggestion on my ouTouch() function:

enter image description here

why is this?

Zorgan
  • 8,227
  • 23
  • 106
  • 207

2 Answers2

2

if you are overriding onTouch listener and you are not calling performClick when clicks are detected, the View may not handle accessibility actions properly. Logic handling the click actions should ideally be placed in View#performClick as some accessibility services invoke performClick when a click action should occur. so to get rid of the warning you have to call v.performClick();

MotionEvent.ACTION_UP:
        v.performClick();
        break;

or

@SuppressLint("ClickableViewAccessibility")
tamtom
  • 2,474
  • 1
  • 20
  • 33
0

The easiest way is suppress a warning

@SuppressLint("ClickableViewAccessibility")

or call performClick()

[Example]

yoAlex5
  • 29,217
  • 8
  • 193
  • 205