intuit / ssp

Variant of sdp project based on the sp size unit.
MIT License
541 stars 107 forks source link

How to use ssp programatically ? #7

Closed Aravindhan12 closed 5 years ago

Aravindhan12 commented 5 years ago

I need to use ssp for programatically created textview. How should i use it ?

elhanan-mishraky commented 5 years ago

((TextView)findViewById(R.id.some_text_view)).setTextSize(TypedValue.COMPLEX_UNIT_PX, getResources().getDimensionPixelSize(R.dimen._12ssp));

Aravindhan12 commented 5 years ago

@elhanan-mishraky It works. Thanks for your quick reply.