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

xslt - Substring before throwing error -

Google Cloud Bigtable Durability/Availability Guarantees -

Android M doze mode and "native" posix socket freezing up -