Basim Sherif
Basim Sherif

Reputation: 5440

Listing Images and Text in Android list view

In my RSS News Reader app,I am currently listing RSS titles in a List view using the following method.I have stored RSS data in array using this method, http://droidapp.co.uk/?p=166 .I want to list RSS feed images along with its title.I fetched image URL from RSS feed.Can anyone help finding a solution?

ListView lv1;

    lv1 = (ListView)findViewById(R.id.listView1);

    lv1.setAdapter(new ArrayAdapter<String>(this,R.layout.mylist , array.PodcastTitle));

Upvotes: 0

Views: 2615

Answers (3)

MAC
MAC

Reputation: 15847

See this custom or dynamic Listview example

also see this to how to load image from URL

enter image description here

Upvotes: 1

Cata
Cata

Reputation: 11211

First you have to make a custom ListView adapter by extending a BaseAdapter and secondly you want to get images in Bitmaps.

here : http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/view/List14.html you have an optimized ListAdapter

and here: Dynamically populate Android ImageView with outside resources you have a clue of how you can download an image and put it into a Bitmap (after that you can put it on to your ImageView)

Upvotes: 0

Khan
Khan

Reputation: 7605

use as example given at https://github.com/thest1/LazyList

Upvotes: 0

Related Questions