A few weeks back I was lamenting the fact that Android doesn’t give you an easy way to simply draw a border around a picture.
But here is at least a workable way to do it in your layout files: enclose your images in a layout element (linear, relative, or absolute); give the enclosing layout element a background color; and place your image smack dab in the center of the layout. Done and done.
Like this (image with a red border 2 device independent pixels wide):
Not anywhere near as simple as it needs to be (jeebus – how about just setting a bordered property, for crying out loud) – but workable enough for gubmint work.