How can I dynamically add item to a Gallery in android

by ying lcs » Thu, 05 Mar 2009 09:03:11 GMT

Sponsored Links

Can you please tell me how can I dynamically add item to Gallery?
I have looked at ApiDemo and have studied their example.

But the ImageAdapter there is a BaseAdapter which has a fixed sized
array and the getCount() just return the length of the array.
My question is how can I change that to a dynamically size vector? I
have set breakpoints in getCount(), and it only called once
dynamically during initialization.  So how can I tell android that the
gallery size has changed?

Thank you.


Other Threads

1. How Tab Pages switch when User Flick left/right?

Anybody knows ......


2. Building your own UI library like the embeddable Google Maps library

I was just wondering where there is any information on creating custom
user interface libraries for Android. I would like to create a library
and include it in an application by specifying something like <uses-
library android:name="" />  in the manifest (just like
maps) and have an Activity that can be inherited from like the

How can one create and build a library like this?



3. how to be paid by the market?

4. Fw: WTS Sprint HTC Hero BNIB Unlocked...

5. How to know the device state(landscape/portrai) programatically

6. Listing on Android Market

7. how to update a ListView in a Tab