0

i don't know if this is possible, but since i cannot extend both, i must use Activity instead of ListActivity in my Main. When i try to change it, i have problems with setListAdapter due to it not being ListActivity anymore. You can see it here http://mobilesiri.com/json-parsing-in-android-using-android-studio/ better than me copy paste the code, its the same. So in maainactivity, how to replace extension ListActivity with Activity and show the listview as in the example. Much appreciated guys, you will save me.

PS. don't know if its worth mentioning, but i want to implement it here somehow, https://www.youtube.com/watch?v=zwqzhY5i2rc and mainactivity extends activity there.

Thx again.

IDontEvenKnow
  • 122
  • 1
  • 1
  • 9
  • Sure you can. Add the listview to the layout xml, then locate it in onCreate using findviewbyid, finally once you have a reference to the list, you can call setAdapter on it. – cYrixmorten Oct 02 '15 at 08:06
  • Im sorry, im new to programming in general, can you give me an example of it for the example i linked, because i dont know how? Much appreciated. – IDontEvenKnow Oct 02 '15 at 10:22
  • A quick google search gave me: http://stackoverflow.com/questions/2242136/how-can-i-implement-a-listview-without-listactivity-use-only-activity – cYrixmorten Oct 02 '15 at 14:45

0 Answers0