多种可选的GridView [英] Multiple selectable GridView

查看:93
本文介绍了多种可选的GridView的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好了,我想我已经精疲力竭搜索了这个问题,它要么是我完全失去了一些东西或其他人曾试图创建一个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.

  • 迈克尔

推荐答案

看一看<一href="http://www.java2s.com/$c$c/Android/UI/ThisdemoillustratestheuseofCHOICEMODEMULTIPLEMODALakaselectionmodeonGridView.htm"相对=nofollow>这个例子的 - 他们使用实现辨认接口的自定义布局类和检查的项目设置彩色背景抽拉

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.

这篇关于多种可选的GridView的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆