how to update Listview items at runtime?

All your problems with Audio, Video and Images.

how to update Listview items at runtime?

Postby manjunath.gudisi » Wed Feb 24, 2010 1:37 pm

Hello,

I want to display the favorite channles in a ListView.

class Favorites extends Activity
{

Vector<String> mFavChNames = { '1", "2", "3", "4" };

void onCreate()
{
mFavListView = (ListView)findViewById(R.id.favListView);
mFavListView.setAdapter(new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, mFavChNames));
}
};

by using above code, I can display 4 channels in the ListView.


After some time, i..e., at run time, my favorite channels will be updated. Lets say

mFavChNames = { '1", "2", "3", "4" , "5", "6" }; OR mFavChNames = { '1", "2", "3" };

Now, I have to display 6 (OR 3) channels in the same ListView.

How can I update the ListView items at runtime?
manjunath.gudisi
Junior Developer
Junior Developer
 
Posts: 10
Joined: Thu Feb 04, 2010 6:58 am

Top

Return to Multimedia Problems

Who is online

Users browsing this forum: No registered users and 19 guests