Android Question An ultra simple photo viewer

JackKirk

Well-Known Member
Licensed User
Longtime User
I'm certain I have seen something in my travels thru the forums but I'm currently going crazy looking for it.

I have a series of largish photos in the cloud with matching thumbnails.

I want to be able to view the thumbnails as a scrollable sequence in both portrait and landscape without blowing up memory - ie there is some management of the number of items in the sequence.

When the user taps a thumbnail he gets the option of downloading the original to the phones photo gallery.

I can do the last bit no problems, can anyone point me to a good prefab view that will do the first bit?
 

Peter Simpson

Expert
Licensed User
Longtime User
the device scrolling images in both portrait and landscape isn't really a problem.
For starters if you are loading your thumbnails then you should definitely be using LoadBitmapSample, especially if you are pre-loading your images, this will definitely save on memory.

I did basically the same thing as you but I used a list view using TwoLinesAndBitmap, but that depends on if you have any text to show with your thumbnails.

Anyway you should try looking at this ScrollView example https://www.b4x.com/android/forum/threads/scrollview-example.6612/#content
 
Upvote 0

JackKirk

Well-Known Member
Licensed User
Longtime User
Thanks Peter, I have already seen both your suggestions and noted them but I'm sure I saw somewhere someone talking about a facility where the images are dynamically loaded/unloaded to conserve memory.

I'm at the proof of concept stage with my app so will try your second suggestion and maybe revisit it later.

If anyone has some additional thoughts please reply...
 
Upvote 0
Top