0

I parsed a URL and turned the data into a ListView of 10 items. Each of these 10 items have their own URLS to parse with more information.

Is there a way to parse all of them at once and only show the one the user clicks on?

Right now I plan on creating new activities for every item then just using an intent to get to the right information. That's a bit annoying though, having 10 classes to update all the time.

I will provide code if need be. I already know how to parse data, but not parsing 10 different links and only showing them when the user clicks on the correct ListView item.

I already have the ListView and I have the onItemClickListener, so maybe something in there could change the URL and start the parse again?

RED_
  • 2,997
  • 4
  • 40
  • 59
  • 1
    Why do you need 10 classes? If the only difference is the data being passed, then you can do this via bundle and extras. – wtsang02 Oct 15 '13 at 19:50
  • There are 10 different json items that need to be parsed all with different http links. I've not come across using bundles and extras. – RED_ Oct 15 '13 at 19:52
  • @wtsang02 Can I get some direction on that? Will it work with separate URLs? It'll be good to learn if so and save lots of time. – RED_ Oct 15 '13 at 20:10
  • [pass data between activities](http://stackoverflow.com/questions/2091465/how-do-i-pass-data-between-activities-in-android) , Your logic of the class should be only written once. The url passed is different, so pass in the urls and use only 1 class. – wtsang02 Oct 15 '13 at 20:16
  • @wtsang02 Ok thats weird because I've done that plenty of times. Just a second ago I used an Intent extra to pass stuff I had parsed to another activity. Sending URLs back to the HttpClient though, is that like within the onPostExecute or something? – RED_ Oct 15 '13 at 20:36

0 Answers0