1

I'm taking part in a company "hackathon" for a charity next week and I'm making the android app :/ I have done very little Android so far so I would like your help as I have been looking on the internet for examples of what I need but have yet to find some.

What I need to to pull back some information from the site using a PHP request into an array of type string, this I know how to do (thanks stackoverflow).

What I would like to do is display this data on the screen using a list view in a certain way. I would like to show an image on the left, with the event name to the right of that, then on the next line the cost and on the next line a short description. The image is a link that will be retrieved from the PHP request. I have tried to show an example below, sorry if it's a little confusing.

Image: Event Name

Image: Cost

Image: Short description of the event

If anyone has an examples that match my need I would be most greatful as I can't seem to find any. Bear in mind that the data will be stored in a String array such as {image link, event name, cost, short desc, image link, event name, cost, short desc, image link, event name, cost, short desc, image link, event name, cost, short desc, }

Nizmon
  • 43
  • 8
  • What have you tried? Looks like you just need "ready-to-use" code - it's not appriciated here. – Dmitry Zaytsev May 09 '12 at 20:34
  • I have been trying to use different examples I have seen around such as the ones below but none fit my needs and I can't seem to adapt, I wouldn't mind "ready to use" code ha ha but I'm more after the right direction :) http://stackoverflow.com/questions/9282464/json-array-and-android-list-view-not-working http://stackoverflow.com/questions/6341580/android-more-complex-listview-tutorial http://www.zoomified.com/articles/android/android-listview.php http://digitallibraryworld.com/?p=195 http://appfulcrum.com/2010/09/12/listview-example-3-simple-multiple-selection-checkboxes/ – Nizmon May 09 '12 at 20:40

1 Answers1

0

You're probably not interested in an answer any more, since your hackathon is most likely over and done with.

However, just for the hell of it :

  1. Use something like JSoup to parse the PHP page and pick out the elements you like. Its a fantastic library I've used it in a number of apps to create an HTML POST request and then sift through the response page
  2. Build up your array of data, create some POJOs for pure convenience.
  3. Display it on the page as a listview, a good example is on the android developers site

Hope that helps

Jimmy
  • 16,123
  • 39
  • 133
  • 213