Click here to Skip to main content
15,886,002 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a spinner control that is scaled up 200% to make it easer to use.
This means the text is also scaled up, so I need to reduce the size of the text to half size. I can do this by using xml, but I need to do it in code.
I can not find any way to do this programmatically?
Just to be clear I do not need to scale the drop down items, just the control itself.

Thanks.
Posted
Updated 9-Apr-15 5:13am
v2
Comments
Richard MacCutchan 9-Apr-15 10:58am    
If you check the XML you should see that it is scaled by use of a property. Find that property in the documentation for the control, and you should be able to figure out how to do it in code.
__John_ 9-Apr-15 11:11am    
Thanks Richard, I can know the scale factor by using getScaleX and getScaleY, I can determine the text size required, but Spinner has no setTextSize method.
I guess there is a TextView in there somewhere, but I have been unsuccessful trying to get access to it.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900