how to get pinch to zoom on one single word of a paragraph. I want to get the focus on that particular word after zooming. how do i do it? kindly, help me out
may this help
Image in Canvas with touch events
Related
I am building an indoor map using an image, now I wanna know which specific area of my image was clicked so I can identify which room/corridor was selected.
I am using a "deep zoom" scalable imageview
https://github.com/davemorrissey/subsampling-scale-image-view
So with the panning and pinching zoom I am not sure if the x,y axis of the images would remain the same or not. Any help would be appreciated.
I think viewToSourceCoord method is what you searching for.
See Extensions -> Utility methods section from documentation
https://github.com/davemorrissey/subsampling-scale-image-view/wiki/10.-Extension
Why not read its own Github's Documentation? Link: https://github.com/davemorrissey/subsampling-scale-image-view/wiki/09.-Events ("Using public methods on the class, you can convert the view coordinates of the event into coordinates of the source image")
I want to implement body part selection in android. My requirement is, when I tap on specific part the image app should be able to identify the body part and color of the selected part should change.Attached a sample image for reference.
Any idea or suggestion at the earliest would be very much appreciated.
In your input, set x,y position each part of body.
Then you can calculate nearst part of touch x,y with simple code.
Or more complex, you can set rect.
In visual part, you can add another imageview overlay original image.
If your image is separated, you can use
imageView.setColorFilter()
I want to move an image within a circle with my touch on move. I've been confused how to determine the coordinates circle boundaries when the finger moved.
For example I want to move this image like lock screen on android tabs.
http://cdn.alltouchtablet.com/wp-content/uploads/2012/03/samsung-galaxy-tab-7-plus-lock-screen.jpg
EDIT :
Now After learn the answer below, I managed to draw an circle image and moving this image around the screen.
And now, I want to restrict the image movement so that it only can moved in a circle, just like in the image above. Any ideas?
I hope you can help me. Thank you!
so I've actually not done anything like this but i know this tutorial : and the guy does something similar to what you want,
this video is one right in the middle of an entire playlist of tutorial videos if you dont get what he's doing check the previous few... as for moving the image in a circle i'm sure there'll be some way to set boundries :)
http://www.youtube.com/watch?v=9d4Wua-cxZs&list=PLB03EA9545DD188C3&index=32&feature=plpp_video
hope it was helpful!
I need to move the position of the image with the direction of finger in the easiest way possible.I found out the direction of the finger touch but I don't know how to move the image in the direction of finger.thanks in advance.
This tutorial will be helpful to you:
http://www.zdnet.com/blog/burnette/how-to-use-multi-touch-in-android-2-part-5-implementing-the-drag-gesture/1789?tag=content;siu-container
I'm loading floor plans into an Android application. I need the user to be able to identify problem areas on the floor plan with a single click. My thought process is to identify the click action, reload the html of the webview adding my marker asset to it at the specified location.
I've loaded the image into a webview to take advantage of zoom capabilities. I can get the X,Y coordinates of the webview where the click occurred, but I can't figure out how to get the current zoom level. Also, I'm not sure what math will be required to translate the X,Y,scale to actual pixel coordinates.
Is the webview the right view for me to use?
EDIT:
Using the link suggested below, I got the zoom functionality working. I still can't figure out how to place a drawable marker on top of the TouchImageView, much less get the coordinates that were actually touched on the image.
For your zoom question as well as coor, How can I get zoom functionality for images? should help you
The accepted answer does use a WebView, but the other answer uses a better approach for enabling zoom. It also provides the necessary math required for translating your X and Y coordinates into usable points.