I'm 17 and I'm italian. This is my first app.
I've foolishly thought this code for maintain 1 line on my switch independently from the screen:
Inside at OnCreate()
while(SWITCH.getLineCount()>1)
SWITCH.setTextSize(SWITCH.getTextSize()-1);
obviously does not work.. why?
I've read a lot of ask but I have not yet figured out how to set the font size dynamically based on the size of the screen.
Thank you very much.
EDIT: for distraction I had written
(SWITCH.getLineCount()-1)
instead of
(SWITCH.getTextSize()-1),
but still does not work.