Android Question Making a dynamic layout like instagram.

Sub7

Active Member
Licensed User
Hi, need some help to choose the best way to create a particular layout.
I need to create a tool that fetch some random images from a server and show it in a wall that should look similar to instagram wall (or Flickr view example from @Erel ) but with an extra label under every image that contain the filename.

My doubts are not how fetch and show the images but how to make many imageviews as many images are available, the image number can be from a minimum of 20 to 200 to 1000 so i will have to dinamically create many views as many images are available for download-
While the number images for each row is costant (5) the cols are not:
For example 55 images = 11 columns that hold 5 images each / 56 images 12 colums and last row contain only 1 image and so on

I was playing with tic tac toe example but i am not sure if that is the best way to accomplish this job.
For each image i will have the store a reference that need to be sent to a webservice which will return additonal data.
I was thinking to use a customlistview so i can pass an array that contain all the references for each row, at every loop, what you think about this?

About the memory:
loading up to 400 images may be a problem, so for that i have modified the imagedownload service so it uses loadbitmapsample, i don't think this will be enough.
I may think to load 50/60 imaged and when the scrollview has reached the bottom then load more image and remove the older ones, do you think this will be enough? but what if scrollup again :€

I know i've ask much and my english is not perfect but i hope that somebody understand.
I just need some little help in choosing the best road to take as i am not very familiar with this.

Thank you so much!!!
 

Attachments

Troberg

Well-Known Member
Licensed User
You won't be able to load that many images at once, so you'll have to set things up so that you load and unload them as needed. It's not that complicated if you build for it from the start, but lots of work if you try to tack it after first trying to load all. So, think this through before starting.
 
Top