Textbox Backgound

aaronk

Well-Known Member
Licensed User
Longtime User
Textbox Background

Hello,

I have been using a Samsung Galaxy (running Android 2.3) to develop my app, and now I have a Sony Xperia Z (running Android 4.1).

On my Galaxy the background on the textboxs are white (just like I want it) but now trying my app out on my Sony, the background is a dark gray.

I can't seem to find how to force the background to be white on all devices.

Does anyone know how to make the textbox background color to be white no matter what device its on ?
 
Last edited:

aaronk

Well-Known Member
Licensed User
Longtime User
Just worked it out..

I just force it to be the old style by removing android:targetSdkVersion="14" from the manifest editor

I also tried .Color=Colors.White but that didn't have the border around the textbox like I wanted.

Unless someone knows another way I will just stick to removing the part of the code from the manifest.
 
Upvote 0

Mahares

Expert
Licensed User
Longtime User
You could leave the manifest as it was without changing it to the old style, but add this to your code:
B4X:
Dim cd As ColorDrawable
cd.Initialize(Colors.White,10)  'white background of text box
txtBox1.Background=cd 
txtBox2.Background=cd
 
Upvote 0
Top