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


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.
Posts: 2
Joined: Mon Jun 22, 2009 1:30 am


Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: No registered users and 3 guests