I have a cell with a fixed width and height, let it be 100x100px. Inside that cell I want to display an ImageView
with a border around.
My first idea was to put
If the images are variable in size then you'll always get that effect. I guess you need to set a fixed size for the ImageView and give it a set background colour - from the look of your example black would make sense. Wrap the imageview in a FrameLayout or just a view with a yellow background and 1px padding.
EDIT
I had a think about this and my answer didn't feel right so...
If you set each ImageView with a fixed size, padding and margin. and then set the background colour as required you can get the effect you want.
In the screenshot both displayed images are less than 100px in width and different heights.
This doesn't handle images with transparent backgrounds as then the (in this case) yellow green colour shows through. You could solve this by wrapping each ImageView in a FrameLayout. Making the ImageView background black and setting the FrameLayout to WrapContent with the required padding (I think)