EditText customizing

pacoMx

Member
Licensed User
Longtime User
Hi, I changed and EditText:

EditTextoBusca.Color = Colors.Gray

It actually did what I expected, but also lost the rounded corners. I don't see a property for it, how can I set the default round corners?

Thanks a lot.
 

klaus

Expert
Licensed User
Longtime User
This code does what you expect:
B4X:
Sub Globals
    Dim EditText1 As EditText
    Dim cdb As ColorDrawable
End Sub

Sub Activity_Create(FirstTime As Boolean)
    EditText1.Initialize("EditText1")
    cdb.Initialize(Colors.Gray, 5)
    EditText1.Background = cdb
    Activity.AddView(EditText1, 30dip, 50dip, 150dip, 60dip)
End Sub
Best regards.
 
Upvote 0
Top