Android Question B4XComboBox GradientDrawable [Resolved]

Sergey_New

Well-Known Member
Licensed User
Longtime User
I create two B4XComboBoxes in the constructor.
I give them equal properties. For B4XComboBox1 in the constructor, for B4XComboBox2 at runtime:
B4X:
Sub Activity_Create(FirstTime As Boolean)
    Activity.LoadLayout("Layout")
    B4XComboBox2.cmbBox.Background=setGradientDrawable
End Sub

Sub setGradientDrawable As GradientDrawable
    Dim gr As GradientDrawable
    Dim cls(2) As Int
    cls(0)=Colors.ARGB(255,124,245,239)
    cls(1)=Colors.ARGB(255,13,142,137)
    gr.Initialize("TOP_BOTTOM",cls)
    gr.CornerRadius=8
    Return gr
End Sub
Why do they look different?
 

Sergey_New

Well-Known Member
Licensed User
Longtime User
Erel,
I didn't understand why set the color? I need a gradient fill.
Tell me the code how to do this so that the arrow is visible.
 
Upvote 0

Sergey_New

Well-Known Member
Licensed User
Longtime User
Erel, thank you very much!
 
Last edited:
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…