android.widget.TextView.getTextSize() is a method that returns the size of the Text in a TextView as a float value. The size is measured in scaled pixels (sp). The method belongs to the android.widget package library.
In this example, we will get the text size of a TextView and display it in a Toast message.
This code gets the TextView with the id "textView", gets the current text size using the getTextSize() method, and sets the text size to twice its current size using the setTextSize() method. The second parameter of the setTextSize() method specifies the unit of measurement (COMPLEX_UNIT_SP) and the new size of the text.
Java TextView.getTextSize - 26 examples found. These are the top rated real world Java examples of android.widget.TextView.getTextSize extracted from open source projects. You can rate examples to help us improve the quality of examples.