Moving image in circle with touch move - 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!

Related

Zoomable Imageview or Activity

I have an activity that has just a image to show like graphical help. It has a lots of info and needs to be zoomed. I searched alot in diffrent sites and they say imageview is not zoomable. and i found complicated algoritjhms for it. i want to make my programm to zoom like many usual proggrams that zoom like my 2 fingers get further image zooms in and if they get close zooms out and and i want to user be able to move postion if image in image view bye moving his finger on it.if its impossible can i make that as background and do these functions on whole activity? thanks for helping
This SO thread should have everything you need to implement the pinch zoom. Alternatively you could have a look at the PhotoView library; an implementation of ImageView that supports zooming.

single touch movement and scaling image in android

I am developing one application with drawing and all, One problem I am facing is I want single touch scaling image. I have done image scaling with multi touch but I am so stuck with single touch.
Example :-
I have one Rectangle on canvas. Now I want to scale and rotate that Rectangle with its one corner with one finger. I am finding this on google but not get perfect materiel or demo and else.
Please help me to find this.
For zooming with single touch this will help you
http://developer.sonymobile.com/wp/2010/05/18/android-one-finger-zoom-tutorial-part-1/

How to show a part of a bitmap on a screen?

Now I want to make a effect,when my finger touch on a picture on the screen, the picture will be show from the top of picture to the position I touched exactly.Can you give me some advice to achieve this effect.Thanks a million,whether or not you will be able to help me.
Not the solution, but a clue:
You will probably need to implement your own animation which will scale / translate your image. There is a lot of tuts on google.
I hope this will help you.

Positioning an image on top of an image with specific coordinates in Android

End Goal: Getting a speedometer style needle to move around a dial according to test results.
Current Issue: At the moment I have placed the needle on top of the speed dial as a sperate image using FrameLayout. I have been scouring the web for a way to position the needle with coordinates so I can have it exactly where I want it on the dial. I would post an image but I'm new to the forum and I'm not allowed!
So in short can I position an image over another image with exact coordinates (allowing for rotation etc)? Am I going the right way about solving my problem?
There is the AbsoluteLayout, which lets you use absolute positions, but it is not recommended that you use it.
Instead, you should create your own extension of a View, that draws your dial and needle. For more info on this, look at Maurycy's comment, which recommends this part of the manual.
Calculate measurements and rotate image of indicator accordingly.

How to get correct imageview coordinates with moveable image

I would like to be able to view a rather large image (floor plan) that can be fully viewed by moving around the picture. When I click on the image, I would also like to get the coordinates on that image.
I've followed this tutorial 1 which works correctly and so allows me to move around the image. After that I also added some functionality to get the position of where I touch the screen. However, when moving around the image, black borders surround it (see picture below), which causes me to get incorrect coordinates.
So would somebody know how I could a) fix/remove the black borders when moving the image or b) correct the coordinates I receive by e.g. removing the border offset?
1 http://www.zdnet.com/blog/burnette/how-to-use-multi-touch-in-android-2-part-2-building-the-touch-example/1763
When you move around the image, set the scroll to stop before it reaches the edges of the image. Use this link for further details.
As for your coordinates, check these other 2 links: link1, link2.
Hope these would help you.

Categories

Resources