I am working on an application in which I need to implement Hot Spot kind of thing. Hot Spot is actually an image having different sections in it, when user clicks on different portions of that image it will reflect in different results accordingly, so my problem is that how can I get the click of these different portions which are present in the single Image, also if I get the X-Coordinates and Y-Coordinates of the same Image then how should I maintain it in different screen resolution. I am displaying a demo image with my question
Here its a single image, now I just want to get click of the four section displayed here, for e.g. if I click on section no.4 I can show another image etc.
Please help me to sort this out, any help would be appreciable.
Thank you.
Finally I found a library for this, though it does lot more than what I want to achieve but its good to use this one.
https://github.com/chrisbanes/PhotoView
Related
I need to create the markups on image view that should look like the markings Instagram. The client should click on some position on the image, enter some text and save it.
For now, the only solution that I see is :
Get click position in the onToch event.
Dynamically put some edit boxes to this position.
Save the text and coordinates.
However, I don't know yet how this will work on different screen sizes.
Since I'm mostly web developer and definitely don't now all android capabilities I hope someone with experience will give me advice. Maybe there some widgets for this task, or algorithm for counting position?
I am stuck in app locker.
Pleas help me to figure out.
Here I use a background image in that there are 9 holes. I need to put images on each hold for password. I try much but each time images are not on the same places on different screens or display devices. Please give me some demo or tutorial. Thank you!
Actually I want to design like the below picture, where the background image is constant with holes, and I want to put on each hole with different pig image. But the problem is I don't know how to design layout for accurate pig position and another important thing is that if the display screen is different, does the layout design work?
Please see above image. My requirement is I should able to detect whether on which number I have clicked. This is single image.
use transparent textviews and place them above the numbers and implement their actionlistenerr. But you have to tackle multiple screens resolutions.
User can select some images to the screen, and be able to select/drag/move/zoom/rotate each image. When an image is selected, it will have a blue border. And user can also bring an image to the front or background.
Here is sample picture in the following: there are two images(girls) on a star-background. The top one has been selected(it has a blue border).
I don't know have to implement it. For several days of learning, I can now drag/move/zoom/rotate a single image(inside an imageview, and scaled by matrix). But I don't know how to handle multi-images.
I want to know:
Is it still a good idea to use ImageView(for each image), or what classes should I use?
How to implement the orders? (so I can bring them to front or background)
How to determine which image has been selected
How to find and draw the border of selected image?
For now, I just know how to use ImageView, but I'm not sure if I can use it to implement this task. Please give me some advices, thanks !
Drawing everything directly onto a Canvas is one way of doing it. There is an article that covers the basics of using a Canvas. You can read it HERE
There is one major downside in doing this - you have to handle all the input events by yourself. The API won't tell you which image has been clicked, or dragged. You'll have to implement that by yourself.
I'm looking for a way to overlay each images of the gallery to 50%.
I have successfully do that with the setSpacing method
gallery.setSpacing((int)(- this.imageWidth / 2));
The problem is that now, we don't see the image at the right of the selected item in gallery, because the selected item is fully displayed. I want to keep this comportement (image selected fully displayed), but also see the image at the right (50%, like each other).
Moreover, and it's an other problem, i'm looking for a way to display my images differently at the left of the selected element than at the right of the selected element. It's a little difficult to explain, so I have drawn the result that I want have :
http://www.hostingpics.net/viewer.php?id=678746customgallery.png
As you can see, the image at the left (yellow) of the selected one (purple) and the image at the right (pink) of the selected one (purple) are side by side because of the difference of disposition between left and right.
I'm french and it's a problem very difficult to explain for me, if you don't have well understand, please ask me for more precision.
Thanks per advance for your help.
Sébastien
EDIT : Thanks to Ramon's answer, I have found this to solve my problem : rudolphmutter.com/?p=31. However, this give me a new problem now, the same as this guy : stackoverflow.com/questions/8598863/. Even I accept the answer, that fit to my question, I'm still waiting for a solution to do what I want in the other stackoverflow's subject.
maybe you can use setChildrenDrawingOrderEnabled(true), then, your selected image will be displayed at the top of the gallery.