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) w
I have used an excellent code by Mihai Fonoage.
And then:
IT WORKS.
Just draw a checkbox onto the cell's bitmap when selected. Draw the original when toggle unchecked.
private Bitmap drawCheck(Bitmap bmp)
{
Bitmap bmChecked = Bitmap.createBitmap(bmp.getWidth(), bmp.getHeight(), bmp.getConfig());
Bitmap check = BitmapFactory.decodeResource(mContext.getResources(), R.drawable.upcheck);
Canvas canvas = new Canvas(bmChecked);
canvas.drawBitmap(bmp, 0, 0, null);
canvas.drawBitmap(check, 0, 0, null);
return bmChecked;
}
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.