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

Popular posts from this blog

ios - RestKit 0.20 — CoreData: error: Failed to call designated initializer on NSManagedObject class (again) -

java - Digest auth with Spring Security using javaconfig -

laravel - PDOException in Connector.php line 55: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) -