Hello Folks, question is pretty simple:
How can i set quickly a rounded border in a button ? I have used this simply routine to set Gradient ...if i want a rounded border too ?
How can i set quickly a rounded border in a button ? I have used this simply routine to set Gradient ...if i want a rounded border too ?
B4X:
Sub DrawButtonGraphic(pCol1 As Int, pCol2 As Int)
Dim canvas1 As Canvas
Dim Clrs(2) As Int
canvas1.Initialize(LoginBt)
Dim r As Rect
Dim btnRect As Rect
btnRect.Initialize(0, 0, LoginBt.Width, LoginBt.Height)
Clrs(0) = pCol1
Clrs(1) = pCol2
GradientButton.Initialize("BOTTOM_TOP", Clrs)
GradientButton.CornerRadius = 6
canvas1.DrawDrawable(GradientButton, btnRect)
Activity.Invalidate()
End Sub