Getting square images like gmail app

Viewed 4195

I want to show images with alphabets like gmail app as shown in the below figure.

enter image description here

Are all those images are images to be kept in drawable folder or they are drawn as square shapes and then letters are drawn to them? Below is what I tried so far to do dynamically. I got just a square shape. Can someone suggest the way to achieve like in gmail app?

GradientDrawable gd = new GradientDrawable();
            gd.mutate();
            gd.setColor(getResources().getColor(gColors[i]));
button.setBackgroundDrawable(gd);
3 Answers
Related