多种可选的GridView可选、多种、GridView

2023-09-05 23:28:05 作者:桃芷

好了,我想我已经精疲力竭搜索了这个问题,它要么是我完全失去了一些东西或其他人曾试图创建一个GridView(显示图像),它允许用户选择多个图像。基本上我想有每当用户选择图像橙色选择框出现,消失或如果用户已经选择了图像

OK, so I think I've exhausted searching for this question, and it's either that I'm totally missing something or nobody else has tried to create a GridView (showing images) which allows the user to select multiple images. Basically I want to have the orange selection box appear whenever a user selects an image, or disappear if the user has already chosen the image.

这是东西,我将不得不推出自己与客户视图?我还可以尝试包括与每个图像CheckBox和选择了复选框如果图像是

Is this something that I'll have to roll myself with a customer View? I may also try including a CheckBox with each image and have the CheckBox selected if the image is.

任何援助将大大AP preciated。

Any assistance would be greatly appreciated.

迈克尔

推荐答案

看一看这个例子的 - 他们使用实现辨认接口的自定义布局类和检查的项目设置彩色背景抽拉

Have a look at this example -- they use a custom layout class that implements Checkable interface and set a colored background-drawable on checked items.