문제

I need to get the positions of each touch when a double touch has done I know that you can get the position of one touch with:

int x = (int)event.getX();
int y = (int)event.getY();

how can I get a second x and y?

올바른 솔루션이 없습니다

다른 팁

event.getPointerCount() will tell you how many touch points there are. To get the other ones, just use an index value in the "Get" method:

x0 = event.getX(0);
x1 = event.getX(1);
...

Why dont you use a logic inside an onTouch function. Use static variable and keep a count if cout becomes two, it's a double click.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top