How to get the Font Size of Text View in Android -
i have created textview
, assign text size 32pt
. want increase text size on button click.
i have written following code, unable understand how current size of text
btnincreasefont.setonclicklistener(new view.onclicklistener() { @override public void onclick(view v) { tvnews.settextscalex(50); } });
kindly guide me
use:
textview.settextsize(getresources().getdimension(r.dimen.textsize));
sample dimensions.xml
<?xml version="1.0" encoding="utf-8"?> <resources> <dimen name="textsize">15sp</dimen> </resources>
Comments
Post a Comment