TextView - setting the text size programmatically doesn't seem to work

前端 未结 7 1265
灰色年华
灰色年华 2020-12-12 17:49

I am using Eclipse Indigo, testing on 2 emulators(2.2 and 3.0).

the code below shows what I am testing now, however setting the text size reveals nothing on the scre

7条回答
  •  猫巷女王i
    2020-12-12 18:11

    This fixed the issue for me. I got uniform font size across all devices.

     textView.setTextSize(TypedValue.COMPLEX_UNIT_PX,getResources().getDimension(R.dimen.font));
    

提交回复
热议问题