Drag one image at a time to the top of another image - android

I have 4 images at the bottom of my screen (but in the future I can have more) and 1 image at the top.
I would like to click on the bottom images one at a time and drag to the top image and at the end save the image from above with all the images.
Note: The user can drag one, two or no image so it depends on it.
I have an example below:
enter image description here
Any tips on how I can do this?
Any API?
Or a Framework?
Any examples in git?

You can download this example and change it to meet your requirement.
I just tested and it works perfectly on Android emulator.
Here is a gif:
Refer: xamarin-imageview-drag-sample

Related

HorizontalScroll Image on Android

I'm new at developing app and I'm trying to do my first app on Android Studio.
I have a problem: I would like that my horizontal scroll targets immediatly the next image (I will leave the photo)This is the first image that we see
After that photo, there is another one: Second Image
You can see that it shows both image 1 and image 2 together and I would like that it shows just 1 image at a time.
Tell me if the question is clear and if you need more information. Thanks
You Can Set One Image At a Time After Time Click The Second Image Is Popup Using The Image Slider
For Image Slider You Use With ViewPager

Image Circulation in android

I have created a app to find the hotels, I am using a slider to show all images related to the hotel's. But I want to get the first image after the last slide in circular fashion.
Get idea through below Picture, Because I want to achieve it in same way.
Sliding SlidingSlidingSliding
All image must be in circular fashion with no end point for image in gallery while sliding.
Please have a look at the below library called InfiniteScrollView.
I think this will do exactly what you are looking for.
https://github.com/satansly/InfiniteScrollView

Draw on an image

Here is my problem. I am currently working on an android application that is handling images. When the application first starts, I have a list of categories (Food, Transport, Emergency ...). So I click on a category for example Food. I find myself in the second activity where I have subcategories (Fruit, Meat, Fish ...). So let's say I click on Fruit. I end up in the third activity which displays images (like in a gridview) of different fruits. I can either click on a fruit to zoom it or I can drag & drop it to the bottom of the activity where I have 3 dropzone that are here for me to create a sequence of images and save it.
So back to my problem, when I zoom on an image I want to be able to add a drawing feature. I want to be able to draw on the image when I click on the menu button of the phone and when I select "Draw". I tried to draw on an image but the drawing lines are always going underneath the pictures so I can't see them. Besides, I want to be able to save the image afterwards and I can't seem to find a way to my problem.
Could someone help me please?
I tried using BitmapFactory but it got me nowhere...
Thank you
Try to use search:
How to draw text On image?
How to draw a Line in ImageView on Android?
https://stackoverflow.com/search?q=android+Draw+on+an+image

Newbie: gallery show only one image each time

I have followed the android gallery tutorial to build a simple gallery which is exactly the same as the tutorial's.
Now, I would like to improve the gallery from the tutorial to show only one image at one time(in the tutorial, several images are showing at once), that's only show one image which occupy the whole gallery area.
Then, only finger touch and move the current image to left or right will make the neighboring next(left or right) image to be shown.
How should I modify the tutorial's code? any suggestions?
You could make the Image the same size as the screen:
i.setLayoutParams(new Gallery.LayoutParams(Gallery.LayoutParams.FILL_PARENT, Gallery.LayoutParams.FILL_PARENT));
i.setScaleType(ImageView.ScaleType.FIT_XY);
This thread might be useful
Android GalleryView Problem

Selecting thumbnail and viewing full screen

I have my app working where it comes to a screen with 6 thumbnails. The user will select one and the next screen is a full image. I've accomplished this through an OnClickListener to call a new activity/xml (I'm new at this, sorry if my terminology is a little off).
My question is: is there a way to avoid creating 6 activty/xml (one for each thumbnail)? ultimately, my app will have about 40 thumbnails that can be selected for full screen view.
I've been trying to follow examples online where it appears that the code is presenting the full image within java instead of referencing an xml file. I've also seen use of Bitmap and BitmapFactory. Is this the way to go?
If the full screen image can be created dynamically within java, will the Back button still work to the user back to the screen with 6 thumbnails?
thanks, J
The simplest approach to take is to pass a reference to the image in the intent you use to launch the full-screen activity.
You can use the BitmapFactory to create a Bitmap, and then update the ImageView (or however you're displaying the image) from the loaded bitmap.
Using this approach, the back button will still work normally, but you'll only need one activity to display the full-screen image.

Categories

Resources