0

I found this tutorial which makes exactly what I need : http://www.androidhive.info/2012/02/android-custom-listview-with-image-and-text/

The problem is that the ListView gets populated from an XML found out on an URL. What I have to change so I can load the list items (Image+Text) from an internal XML ?

Catalin H
  • 215
  • 4
  • 14

1 Answers1

0

What do you mean by "internal" xml?
Is your XML file on the SD card or is it compiled in to your application as a raw resource?

Take a look at these links :

Reading an .xml file from sdcard

Android : Reading XML from local resource (for testing)

The line in your code that you will need to change is :

String xml = parser.getXmlFromUrl(URL); // getting XML from URL
Community
  • 1
  • 1
Akos Cz
  • 12,711
  • 1
  • 37
  • 32