Android Question B4XComboBox on click background

Nitin Joshi

Active Member
Licensed User
I am using B4XComboBox having textcolor white. However, as text color is set white, when clicked on combo box to select the item, user can not see the values as background after click is also white. Attached is the snapshot for the reference.

I have tried following code but it does change background of ComboBox however on
ComBox background color change:
    Dim cd As ColorDrawable
    cd.Initialize(Colors.Transparent,0)
    ComboBox1.cmbBox.Background=cd
click background remains white.
 

Attachments

  • Combo box white background.JPG
    Combo box white background.JPG
    12.6 KB · Views: 181

Nitin Joshi

Active Member
Licensed User
Use B4XView.SetColorAndBorder
Can you please help me on this? I mean, i do not know how to use

Color property instead.
I did not find dropdownbackground color selection in color properties....

change the theme from dark to light (or the opposite) in the manifest editor.
I have never used manifest to apply the them. Can you please provide syntax for the same?
However, in some cases ComboBox requires light theme and in some cases dark theme then i believe manifest editor will not be useful.
 
Upvote 0

Mahares

Expert
Licensed User
Longtime User
Can you please help me on this? I mean, i do not know how to use
B4X:
Dim b As B4XView=B4XComboBox2.cmbBox
    b.SetColorAndBorder(xui.Color_Red, 5dip, xui.Color_Yellow, 10dip)

I did not find dropdownbackground color selection in color properties....
B4X:
B4XComboBox2.cmbBox.DropdownBackgroundColor =xui.Color_Magenta

For the manifest:
B4X:
CreateResourceFromFile(Macro, Themes.DarkTheme)
or:
B4X:
CreateResourceFromFile(Macro, Themes.LightTheme)
 
Upvote 0

Nitin Joshi

Active Member
Licensed User
Thanks for nice feedback.

I have a doubt...I can either apply dark or light theme, now suppose, if i apply dark theme however in case (in same project) combo box is required light then i need to apply colors for light theme by coding?
 
Upvote 0
Top