Setting the background color of a spinner

330 views
Skip to first unread message

Elvis Sogunro

unread,
Mar 8, 2021, 5:52:09 AM3/8/21
to DroidScript
Hi everyone,

I created a simple date picker with 3 spinners and changed the text and back colors to match my App page theme, however, the drop down list back color from the spinners remained stubbornly dark though the top of it showing the selection changed to the white color selected using the .SetbackColor("#ffffff") method. The text color however responded all the way down the spinner list thus making it not clearly visible on the spinner list background.

Please see attached image.

Is there any way to change the whole background color of the spinner, so that it's not only the top of it that's responding to the back color command?

ThanksSpinner Screenshot.png

Alan Hendry

unread,
Mar 8, 2021, 11:49:25 AM3/8/21
to DroidScript
Hi,
I'm not an expert, but you could try 
spin.AdjustColorhuesaturationbrightnesscontrast )  
I've only used AdjustColor on a SeekBar, you have to use the 4 parameters above not the usual rgb.
Regards, ah

Elvis Sogunro

unread,
Mar 8, 2021, 2:02:39 PM3/8/21
to DroidScript
Thanks, I forgot to add that it was one of the options that I tried out but didn't work. In fact, I tried a  the methods that has to do with changing the looks of the object including transparency setting. At the end of the day I chose to use a lighter text color that's visible on both the white background and the dark background of the spinner.

Alan Hendry

unread,
Mar 9, 2021, 4:46:25 AM3/9/21
to DroidScript
Hi,
I'm not premium, if you are then it may be worth looking at spin.Method, 
Alternatively you can 
add a Text to your main Layout
create a Dialog, add a Layout to it, then add a List to the Layout; 
the On Touch Down for the Text should Show the Dialog;
the On Touch for the List should Dismiss the Dialog (as well as do your other processing). 
Or the list of Plugins has UIExtras which includes "date & time pickers" but you have to buy it. 
Regards, ah

Reply all
Reply to author
Forward
0 new messages