android - Achieve different text sizes of RadioButton programmatically -


i'm using different sizes of text different screen resolutions. this, created resource values/dimens.xml , values-sw720dp/dimens.xml. not understand how use values dimens.xml when creating radiobutton programmatically?

radiobutton newradiobutton = new radiobutton(this);  newradiobutton.settextsize(30); //how use values  dimens.xml? newradiobutton.settextcolor(color.parsecolor("#002060"));  radiogroup.addview(newradiobutton, layoutparams); 

getresources().getdimension(r.dimen.test) 

Comments

Popular posts from this blog

javascript - oscilloscope of speaker input stops rendering after a few seconds -

javascript - gulp-nodemon - nodejs restart after file change - Error: listen EADDRINUSE events.js:85 -

Fatal Python error: Py_Initialize: unable to load the file system codec. ImportError: No module named 'encodings' -