We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is there a better way than below code? I am trying to find out the position(X, Y) of selected text on a zoomed image.
ImageMatrixTouchHandler imageMatrixTouchHandler = new ImageMatrixTouchHandler(layout.getContext()){ @Override public boolean onTouch(View view, MotionEvent event) { Log.d(TAG, "onTouch: "); super.onTouch(view, event); Log.d(TAG, "onTouch: super"); final GestureDetector gestureDetector = new GestureDetector(ViewImageActivity.this, new GestureDetector.SimpleOnGestureListener() { public void onLongPress(MotionEvent e) { Log.e(TAG, "Longpress detected event "+event.getAction()+" e "+e.getAction()); if(event.getAction() == 0){ Log.d(TAG, "onLongPress: real detected X: "+e.getX()+" Y: "+e.getY()+" event X: "+event.getX()+" Y: "+event.getY()+" raw Y"+event.getRawY()); Toast.makeText(getApplicationContext(), "Long Clicked " , Toast.LENGTH_SHORT).show(); } } }); gestureDetector.onTouchEvent(event); return true; // indicate event was handled } }; ivImage.setOnTouchListener(imageMatrixTouchHandler);
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Is there a better way than below code? I am trying to find out the position(X, Y) of selected text on a zoomed image.
The text was updated successfully, but these errors were encountered: