I have created an ImageView image = new ImageView(myMainActivity.this); Bitmap pictBM = BitmapFactory.decodeFile(fName); image.setImageBitmap(pictBM); . . .
How do I create an overlay or something so I can click an ImageButton and then mark two points draw a line between them and measure the distance? Also on the ImageButton is there a way to click and hold it down (as Active) until the two clicks on the image have taken place ??? so far I have the calcDistance function private double calcDistance (Point pt1, Point pt2) { double square_x = (double) (pt2.x * pt2.x) - (double)(pt1.x * pt1.x); double square_y = (double) (pt2.y * pt2.y) - (double)(pt1.y * pt1.y); double dist = Math.sqrt( (double)square_x + (double)square_y ); return dist; } I can't seem to get it right to mark the Image and the online examples all talk about R.drawable which I have none . Thanks in advance -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en