开发者

Dynamically adding images to Gallery

开发者 https://www.devze.com 2023-02-23 00:42 出处:网络
The basic user action is dragging/dropping an image from a Gallery to a dropspot. The image that is dropped into the dropspot will populate another Gallery with the same image that was just dropped.

The basic user action is dragging/dropping an image from a Gallery to a dropspot. The image that is dropped into the dropspot will populate another Gallery with the same image that was just dropped.

How would I add these "dropped" images into the new Gallery array?

Right now I have standard ImageAdapters linked to each Gallery, with the same array of images in each...would I use an Arrayadapter for the second Gallery inst开发者_StackOverflowead?


You would need to create your own custom ImageAdapter likely by extending BaseAdapter. The custom adapter would have to allow you to add that image when dropped.

One other item that might help is this link: Image Adapter adding ImageViews dynamically to GridView without Cursor. It's not a complete solution, but it's a start.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号