I want to add zooming effect to imageview.But i want this zooming effect from current position to specified position inorder to show other image at specified position.
Please help.
Thanks in advance.
look at this tutorial on how to zoom and pan an image and it is quite nice.
Related
I have back side TouchImageview, which having zoom in/out functionality, I am setting up bitmap on ImageView, the size of Bitmap is w-h (2100 x 2900), I have particular X-Y co-ordinate, now I want to add Overlay view at same co-ordinate as per imageview's X-Y co-ordinate, the background imageview should be touchable.
Can you please let me know solution for the same.
Thank you.
I'm an iOS developer, but can be answer to your question, as I'm sure that these things are also possible in Android ! ;)
You can follow these steps:
Don’t make any change in your current flow.
Add overlay view the way you want.
Take screenshot of the back image view which are showing location, may be of particular size (or the exact size of circle on overlay).
Show that captured screenshot (image) at circle view position (you can have an another image view for that).
Zoom that image view (From Step.4)
You are done!
Goodluck.
i want to use PDFNet to read and create some overlay image on top of PDF like marker on map. I don't know how to get touch position on PDF and how re-calculate that position then i make a move or zoom. Please tell me the way.
Thank you!
To get the touch position start with PreToolManagerListener.onSingleTapConfirmed method in ToolManager.java file. Once you have the touch position, which will be in screen coordinates, you would call PDFViewCtrl.convScreenPtToPagePt To get the coordinates in the particular PDF page. From there you can match up the page coordinates with your map marker.
PDFViewCtrl.convScreenPtToPagePt will handle all page transformations, including layout, zoom, position, rotation, etc.
I need to add a picture over a touched position in an image or directly on camera preview.
How could get the touch coordinates and set the image in the touched area?
And If I want to move the added images?
What is the right way to code this stuff? Is there some sample or tutorial?
event.getX() and event.getY() should give you the coordinates.
Here is a more detailed answer on getting the coordinates. Get the co-ordinates of a touch event on Android
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 am making an small application in android in which i used an image and i used two buttons here when i click the first button the image will zoom and when i click second button the image will zoom out. But now i want when the image will zoom i can able to move the image with mouse cursor in emulator or(by touch in devise) so that i can able to view the whole image after zooming.can you suggest me any idea .**
Thanks in advance!
Try just moving the initial drawing coordinates. For instance when the image is first shown, I would imagine that it is at 0,0. when you want to move the image just directly modify the start coords accordingly.