From Api level 1, you can use the public void setTextSize (float size)
method.
From the documentation:
Set the default text size to the given value, interpreted as "scaled pixel" units. This size is adjusted based on the current density and user font size preference.
Parameters: size -> float: The scaled pixel size.
So you can simple do:
textView.setTextSize(12); // your size in sp