You can create a ColorDrawable object and set its corner radius. You should then set it as the panel's background. Note that it can also be done with the designer.
Public Sub DrawBorder(Target As View, aColor As Int, StrokeWidth As Int)
Dim c As Canvas
c.Initialize(Target)
Dim r As Rect : r.Initialize(0, 0, Target.Width - StrokeWidth, Target.Height - StrokeWidth)
c.DrawRect(r, aColor, False, StrokeWidth)
Target.Invalidate
End Sub