Android Question Change background / focusring color

MarcRB

Active Member
Licensed User
Longtime User
Hi, Is it possible to change the background and focusring/border color?

for example at a autocompleteedittext the background is by default White and the focusring is Orange.
Can this be changed ?
 

eurojam

Well-Known Member
Licensed User
Longtime User
see this example, it is not exact that you asked for, but I posted it some hours ago in the german forum....may be it helps you
B4X:
Sub Globals
    'These global variables will be redeclared each time the activity is created.
    'These variables can only be accessed from this module.
    Private pn As Panel
End Sub

Sub Activity_Create(FirstTime As Boolean)

    'Do not forget to load the layout file created with the visual designer. For example:
    'Activity.LoadLayout("Layout1")
    pn.Initialize("pn")
    Activity.AddView(pn, 10dip,10dip, 100dip,100dip)

    Dim cd As ColorDrawable
    cd.Initialize(Colors.Red, 0)
    pn.Background=cd
End Sub

Sub pn_Click
    Dim cd As ColorDrawable
    cd.Initialize(Colors.Red, 20dip)
    pn.Background=cd 
End Sub
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…