Android Question WheelPicker Spinner

Pedro Caldeira

Active Member
Licensed User
Longtime User
Hello All,
I have just got @Alexander Stolte's WheelPicker Library, but I can't set a light background with black text. Any restraints in text color ?
I wanted to mimic the IOs Spinner
time.png
 

Pedro Caldeira

Active Member
Licensed User
Longtime User
Managed to solve it using items. However the text size does not chenge even enlarging it to 20, 30, 40 it always appear very small.
Any hints ?

Thanks
 
Upvote 0

Alexander Stolte

Expert
Licensed User
Longtime User
The ASWheelPicker1.ItemTextProperties has a description if you hover with the mouse about the function in code, there is a code available that you can copy. It is important to follow this code for the properties, otherwise they will not change.

B4X:
    'Global Properties before you add items
    Dim ItemTextProperties As ASWheelPicker_ItemTextProperties = ASWheelPicker1.ItemTextProperties
    ItemTextProperties.TextColor = xui.Color_Red
    ItemTextProperties.TextFont = xui.CreateDefaultBoldFont(25)
    ASWheelPicker1.ItemTextProperties = ItemTextProperties

    'Add Items
    Dim tmp_lst As List : tmp_lst.Initialize
    For i = 0 To 50 -1
        tmp_lst.Add("Test " & i)
    Next
    ASWheelPicker1.AddItems(tmp_lst)'Refresh it
 
    ASWheelPicker1.Refresh
 
Last edited:
Upvote 1
Top