thks, klaus. And with the code ? Ah, can i achive this with SetBorder ?Set the Width and Height properties to the same value and the corner radius to the half of that value.
Thks very much.B4X:Dim Button1 As Button Button1.Initialize("Button1") Activity.AddView(Button1, 50dip, 50dip, 100dip, 100dip) Button1.Text="TEST1" Dim cdw As ColorDrawable cdw.Initialize2(Colors.Red, 50dip, 1dip, Colors.Black) Button1.Background = cdw
Ops, what library must i use for ColorDrawable in B4i ?? I can't find.B4X:Dim Button1 As Button Button1.Initialize("Button1") Activity.AddView(Button1, 50dip, 50dip, 100dip, 100dip) Button1.Text="TEST1" Dim cdw As ColorDrawable cdw.Initialize2(Colors.Red, 50dip, 1dip, Colors.Black) Button1.Background = cdw
Hello,You don't need any library it's part of the core library.
Tank you, klaus, all is workong OK. Have a nice weekend.Sorry, I was thinking in B4A instead of B4i !
B4X:Private Button1 As Button Button1.InitializeCustom("Button1", Colors.Black, Colors.Blue) Page1.RootPanel.AddView(Button1, 50, 50, 100, 100) Button1.Color = Colors.Red Button1.SetBorder(1, Colors.Black, 50)