I am quite new in android. I have a problem in handling touch event while talkback is enabled.
I am testing on android 6 ,galaxy S6:
First:I have activated Voice support on the device (Settings\Accessibility\Vision\Talkback).
second : On the page, double clicked at the icon on the screen, it doesn't show the correct coordinates, it seems it keeps the previous value:
This is part of my code, x and y doesn't change while double clicking:
characterCircle.setOnTouchListener(new OnTouchListener() {
@Override
public boolean onTouch(View v, MotionEvent event) {
pinBlock.setLastPinDigit("");
int [] xLoc = characterCircle.getxLoc();
int [] yLoc = characterCircle.getyLoc();
String [] zValue = characterCircle.getzValue();
if(xLoc == null){
return false;
}
float x = event.getX();
float y = event.getY();
int boundaryX = characterCircle.getmRadius() / 13;
int boundaryY = characterCircle.getmRadius() / 13;
I have tried getRowX() and getRowY() , but they don't work in my case. because I don't want to have position related to the screen..
Please help me in this issue.
Many thanks