Android Question How to round only one, or two corners on the button

Mahares

Expert
Licensed User
Longtime User
How to round only 1,2,3 corners on a button or a panel ?
Something like this:
B4X:
Dim cd As ColorDrawable
  cd.Initialize(Colors.Red,0)  'you can use xui colors
  Button1.Text="electro179"
  Button1.Background = cd
  Dim jo As JavaObject = Button1.Background
  Dim x As Int=20dip
  jo.RunMethod("setCornerRadii", Array(Array As Float(x, x, x, x, x, x, 0, 0)))  '3 corners rounded
 

Attachments

  • electro179.png
    electro179.png
    1.3 KB · Views: 232
Upvote 0
Top