I have a question that I have a custom grid view in which two images one is the background image and second is the check mark image, when I clicked on one Item of grid view
In your code you forgot to unselect all images except the current selected image. only you have done is setting background for selected image. you need to set unseleted images for others aswell
*Step-1*initialize selected position as -1 in GridAdapter class
int checked=0;
int selectedPosition = -1;
*Step-2*rewrite your onclick method as given below
@Override
public void onClick(View v) {
Log.i("Clicked", "Tag###########");
//img_select.setVisibility(View.INVISIBLE);
img_select.setFocusable(true);
img_select.setEnabled(true);
if(checked==0)
{
selectedPosition = position;
}
for(int i = 0; i