Select a portion of image in ImageView and retrieve the end points of selected rectangle
问题 I need to drag and select a portion of an image set in an ImageView and retrieve the end points of the selected rectangle without causing any modifications (such as crop). So far all I've been able to do is figure out the co-ordinates of the point where the user taps the screen. ImageView imageView = (ImageView) findViewById(R.id.imageView); imageView.setOnTouchListener(new View.OnTouchListener() { @Override public boolean onTouch(View v, MotionEvent event) { //Simply displays a toast