0

Hello friends a question like I can add the following view to a view inside a gridview. I am working on the selection of photos but I would like to be able to create a view Like the following, but I have no idea how to add the check in the photo Does anyone know how I can start on that?

Thank you

enter image description here

Devix
  • 432
  • 5
  • 16

2 Answers2

0

You already did great. Just follow this steps.

  1. Initially, Hide the checkbox
  2. Detect when user click the Grid cell, and make check visible
  3. If user click again, Hide the Check
Ajay Shrestha
  • 2,433
  • 1
  • 21
  • 25
0

you can set a foreground drawable.

xml :

android:foreground="@drawable/check_bg"

java code :

mImageView.setForeground(ContextCompat.getDrawable(context, R.drawable.check_bg));

Oren Zakay
  • 519
  • 8
  • 17