0

i started android development about a week ago and i made a small application with listview fetching the data for it from a xml file an a remote server where i get a (name, date, details, image url) everything works fine except for the imageview where it shows nothing. here is the code i used:

public class ActivityListViewActivity extends ListActivity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);


    XMLParser parse = new XMLParser(); 
    //this is where i get my data from the xml file
    ArrayList<HashMap<String, String>> newsList = parse.StartParsing();

    ListAdapter adaptor = new SimpleAdapter(this, newsList, R.layout.list_item
            , new String[] {"name", "description", "date", "details", "image"},     new int[] {
            R.id.name, R.id.description, R.id.date, R.id.details, R.id.image});

    this.setListAdapter(adaptor);
Ahmad
  • 9
  • 1
  • 5

1 Answers1

0

Refer following link. use- 4. Tutorial: ListActivity with own layout http://www.vogella.de/articles/AndroidListView/article.html

You can Implementing your own adapter also.Examples are available in above link.

Ramindu Weeraman
  • 344
  • 2
  • 10