android.widget.EditText is a subclass of TextView that is used to allow the user to enter and edit text. The setTextSize method is used to set the size of the font used in the EditText view.
Example 1: EditText editText = findViewById(R.id.editText); editText.setTextSize(20);
This example sets the text size of the EditText view to 20dp.
Example 2: EditText editText = new EditText(context); editText.setTextSize(TypedValue.COMPLEX_UNIT_SP, 16);
This example creates a new EditText view with text size set to 16sp using the COMPLEX_UNIT_SP unit.
Package library: android.widget.
Java EditText.setTextSize - 30 examples found. These are the top rated real world Java examples of android.widget.EditText.setTextSize extracted from open source projects. You can rate examples to help us improve the quality of examples.