简体   繁体   中英

How to programatically change font size of android device?

I am making an app that has three buttons. Small, Medium and Large.I want my app to change the font size setting of the device according to the button clicked.Can anyone please help me with this

add setOnClickListener() to each button and do textview.setTextSize() for which you want to change. The number you set is in unit SP

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM