Android Question EditText Background color in the designer

sirjo66

Well-Known Member
Licensed User
Longtime User
Hello everyone,

in the designer, I have an EditText object, and I want to set text's background color property, but I don't find where I can set it.
I find Text Color and Hint Color, but where is Background Color property ???

I use this line in runtime code:
B4X:
EditText1.Color = Colors.White
and it works, but how can I do it in the designer ??

Many thanks
Sergio

P.S.: I use B4A 4.00
 

sirjo66

Well-Known Member
Licensed User
Longtime User
Many thanks.
I have an Activity with black background color, and I want an EditText with black forecolor and white background color. Is it possible by designer ??

Can you tell me web page where I can study "drawable" concept on B4A ??
I don't understand very well.

Thanks
Sergio
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
There is no simple way to change the EditText color. Not with the designer and not by code. The EditText is based on a nine-patch image so it is not possible to just change its color.

The simplest way to deal with the colors is to use the default colors. You can change to a light or dark theme in the manifest editor.

If you like you can replace the EditText background drawable with a different drawable that you provide. Search for BitmapDrawable.
 
Upvote 0
Top