What is textview.setTextSize()?… here is a solution to the problem.
What is textview.setTextSize()?
In my Android game, there is a TextView. I’m using the following code to set the text size.
textview.setTextSize(30);
30
in pixels. But what exactly is it? Is it the height or width of the character? Is it a serial number? ?
Solution
To set the text size in android (java or kotlin), simply use SP
textView.setTextSize(TypedValue.COMPLEX_UNIT_SP, 14);