Drag and Drop Image at particular position - android

In my android project I have 50 small images that need to be dragged and dropped in three big images.I set that three big images as the background of three different relative layouts.Now I want to restrict the dropped area in all three big images and also want to get the dropped place which will be later used when user came to the same page next time.I dont know how to begin and where to begin?Can anyone help me?I want the dropped place and also restrict the place of dropped....
Thanks!!

Related

Responding to Touch events in different locations in an ImageView android

I need to be able to display different Toast messages to the user based on what object he clicks on inside an image. For example, if we have an image with different types of animals, I need to display the name of the animal based on where the user touches the image.
Would it be possible to add another Views such as ImageButtons on top of the ImageView at specific locations? The problem here is that some images are big enough and should be added to a ScrollView. So would this implementation slow down the app?
So I am asking here exactly at best practices.
Any help is much appreciated!!

How do I get different click positions in a single ImageView

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

Showing multiple images in Android Canvas for Android Game

I have three different images and i want to write a code which will randomly select any of these images and display it at the top of the screen.
Then this image will move downwards and once it reaches the bottom of the screen the image will disappear from the screen.
Now this logic should be continued in the loop where these images will keep on appearing at the top and move towards the bottom of the screen.
I am unable to figure out a way for this. I am trying this on the Canvas.
Basically these three images are kind of Weapons (one is arrow, another is bomb and third one is missile). I want a continuous loop where these images will keep on occurring at the top of the screen and moves downwards and disappear once they reach the bottom.
Can anyone please help me with this?

Set buttons on image in specific locations

I'm trying to crate custom map in my application, the needed map is not Google map, its consists of image and small pins images, in other word its image view,,, i need to set buttons on this image in specific locations, and wen these buttons clicked , i need to perform some action, the problem is i didn't found a way makes me able to set buttons on this image at run time, the image and the buttons locations will be received from the server side, so i need to create this custom map at run time. maybe i need to set the buttons on specific pixels, but i don't know how i can reach specific pixels in the image, i appreciate any help in this. thank you all.

Marquee of Images in android

I m working on the showing of marquee of images in my project.
I had referred this example from github.
My Problem is, i m in need of showing the images only on the top of the screen not in the entire screen(like thumb images).
In that github example, they had used LinearLayout for showing the images which is scrolled automatically.
In my case the images are dynamic , i have to retrieve them from the database.
The total of number images size may vary.
My problem is when i have reached the last image, auto scroll stops , Also if i have only two images, it won't scroll.
So i m keen to know, is there any other way to achieve marquee of images in android.

Categories

Resources