Newbie: gallery show only one image each time - android

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

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

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

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

How to Drop image over image view using fingure touch

I am very much new this issue.I want to make application like this.look at the image below,This is a brief summary of my requirement.
ok so top there is a image view.After user capture image from camera in OnActivityResult I am displaying captured image on main image view. Below that image view there is a HorzontalScrollView, Inside HorzontalScrollView i have put couple of images,like hat,spects etc...
ok so What i want is, user should be able to drag any image from HorzontalScrollView and can be able to put that small image on main image view.
Any guide/tutorial will be appreciated from guys who have worked on such functionality
Thanks

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

Some questions about Gallery widget

1.I wish my gallery widget can dispaly 6 images at the same time, and the layout is a 2*3 matrix, and when I slide the screen, the widget display another 6 images, how to code this function?
2.I want to add some dots under the gallery widget to show which page the gallery is displaying, is there a widget can achieve this function?
3.I know hot to load pitcures in the res/drawable, but if my pitcures are in a database, how to load them?
4.I want to add some buttons to set the gallery widget to display different category images, how to code?
thx for your answer!!

Categories

Resources