Need Help with Dynamic Usage of Gallery view

Put problem concerning Views, Layouts and other XML-Resources (like AndroidManifest) here.

Need Help with Dynamic Usage of Gallery view

Postby northernguy69 » Wed Dec 09, 2009 8:21 pm

I'm fairly new to android development and I can't seem to figure out how to do a certain task with the Gallery view. Basically, i'm trying to get json data from a url which will provide me with an ids and a urls to images.

An example of the sample return json string would be as follows:

[{"image_id":445, "image_url":""}, {"image_id":446, "image_url":""}]

- How could i dynamically build the Gallery with the image URL's obtained from the JSON data?
- For each image in the Gallery, how can i give it the "image_id" value from the json data so that when i click on that image, i can start a new activity and pass it the necessary image_id value via intent.putExtra("image_id", "445"); ?

I appreciate any help you can provide me with!

Posts: 5
Joined: Wed Dec 09, 2009 8:05 pm


Postby qlimax » Wed Dec 09, 2009 10:18 pm

building and parsing json strings: ... bject.html

loading images from the web

associate (and getting) additional informations to the view (ImageView)
Code: Select all

sorry... it's only a list of links. the full answer would be a great tutorial :)

bye ;)
¯`·.¸¸.><((((º>¯`·.¸¸. ><((((º>
User avatar
Master Developer
Master Developer
Posts: 271
Joined: Mon Aug 31, 2009 10:54 am
Location: Swiss


Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: No registered users and 8 guests