从电网得到的图像视图的背景颜色 [英] get the background color of the image view from the grid
问题描述
我想实现一些画廊查看一个应用程序。我有一个网格视图,用户必须能够从网格中选择多个图像,说,如果用户从电网点击第一图像(我想,以表明它是selected..so设置例如一个背景颜色用户白),那么如果用户点击相同的图像的背景颜色必须复位到默认的..
I am trying to implement an app with some gallery view. I have a grid view and the user must be able to select multiple images from the grid, say if the user clicks the first image from the grid (I want to show the user that it is selected..so set a background color for example white), then if the user clicks the same image the background color must be reset to the default one..
我怎样才能做到这一点...任何想法......
How can I do this...any ideas...
在此先感谢...
快乐编码
推荐答案
使用整数,不采取任何%2,如果0放BG为白色,如果1设置的值在每个点击的没蓝,增加值
use integer and take no%2 if 0 put bg as white if 1 set the value as blue, increment value of the no in each click
这篇关于从电网得到的图像视图的背景颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!