Just subclass the View type you’re using, and override on Draw with a quick call to canvas.drawLine.

Remember to call super.onDraw first, so that the text or image or standard contents is rendered beneath your border. Also, ViewGroups will need to have setWillNotDraw( false );