intuit / ssp

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

How to use ssp programatically ? #7

Closed Aravindhan12 closed 6 years ago

Aravindhan12 commented 6 years ago

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

elhanan-mishraky commented 6 years ago

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

Aravindhan12 commented 6 years ago

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