In dimens.xml, I have:
18sp
In runtime, I get this value and set the text size of a text vi
Add dimension in dimens.xml:
Set the size in code:
textView.setTextSize(TypedValue.COMPLEX_UNIT_PX, getResources().getDimension(R.dimen.text_medium));