How can i switch adapter for a Gallery?

Put problem concerning Views, Layouts and other XML-Resources (like AndroidManifest) here.

How can i switch adapter for a Gallery?

Postby n179911 » Mon Jun 22, 2009 1:33 am

Hi,

Is it possible for me to dynamically switch the adapter of a Gallery?

In the onCreate() of my activity, I did this: myGallery.setAdapter(adapter1);

And then later on in my code, I did myGallery.setAdapter(anotherAdapter1);

I tried, that but in the emulator, the myGallery never gets update when I do 'setAdapter' again. How can I force myGallery free up all the items when it was using adapter1 and then makes it repopulate items for anotherAdapter1?

Thank you.
n179911
Freshman
Freshman
 
Posts: 2
Joined: Mon Jun 22, 2009 1:30 am

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: No registered users and 4 guests