If you want to update the image for one specific element in the grid, what you can do is ... have onClickListener for all the images in the grid.
Now, when u clicks on any image, find the position of the image and change the original cheers resource for that particular image.
Example:
When adding an image: imageView.setOnClickListener (imageListener);
And the listener will look like dis:
private OnClickListener imageListener = new OnClickListener() { public void onClick(View v) { int id = v.getId(); ImageView imgView = imageArray.get(id); imgView .setBackgroundResource(R.drawable.newImage); };
I hope you will like it.
source share