Android Image Gallery in Grid Form - android

I am working on a project related to some image viewer. I get images from some server and display their thumbnail version on screen. I want to show the images in 3 x 2 matrix means 2 images per row and 3 rows. Images can be from 1 to 50. User may click on a particular image, its details are loaded and shown on screen. The problem I am facing is how to create a matrix view and when user click on a particular image, how to identify which image was clicked so that its details can be loaded and displayed...???

Gridview is easy way.Besides with fixed matrix, you can use normal layout.GoodLuck

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

Photo gallery with infinite scrolling, dynamically loaded images and others

I would like to create photo gallery in my app. My requirements are:
infinite scrolling (like in Infinite Gallery http://blog.blundell-apps.com/infinite-scrolling-gallery/)
view - like in the picture below - selected photo is visible and on the right there is small part of next photo
pics are dynamically downloaded from server while scrolling - problem is that I don't have ready url list before creating gallery - I only have codename for image, for example:
codename is "photocar",
and url for the images are like:
http://www.MY_SERVER.com/pics/photocar1.png
http://www.MY_SERVER.com/pics/photocar2.png
http://www.MY_SERVER.com/pics/photocar5.png
...
(after codename there is counter). I don't know how much images there is but assume that I want to add max 20 images (if exists), another problem is that image counter is not continuous - I mean sometimes only images 1, 2, 3 exists, but sometimes it may be 3, 5, 10, 19. How to check which ones exists and add them do gallery (I thought about opening HttpURLConnection and checking response code but it's pretty slow)?
images have different sizes and aspect ratio so they have to be cut to aspect ratio around 16:9
What's the best approach?

How to decide which item will be shown at first in the screen in android gallery?

I have a gallery that consist of small size of pictures and when I click any of them a gallery comes to screen with bigger images of those small pictures. And for example I clicked the 3. picture of gallery, in the second screen I want to see the 3. picture first but when I scroll it left or right I want to see other pictures. How can I do this?
pass that selected int to next screen and then do this:
galleryView.setSelection(3); //3 or whatever you send your position from previous screen
Remember do this, after setting the Adapter to Gallery.

how to get what are the images are on the screen at runtime in android sdk

I don't know how to get the images what are available on the scree. I'm using imageview for the purpose of display the images on the screen.
Images will be changed randomly because i stored the images into array and images are in drawable. I want to know which image is displays on the screen at runtime.
thank u
When you change the image in the ImageView, hold onto the array index that you used in another variable.

Android Simple Gallery Focused Item Issue

I have a gallery that I use to display some ImageViews. I'd like to know which image in the gallery is currently highlighted/focused.
So far, setOnItemClickListener only fires if I actually click on the images. If I scroll through the images, a new image takes focus. I want to know which image that is.
How can I do this?
Get the images number in the list
Get the image (view) it self

Categories

Resources