开发者

Android: stretch text so that the letters fill the device screen

开发者 https://www.devze.com 2023-03-26 11:00 出处:网络
I\'m trying to stretch text so that a given string fills the entire screen. I kno开发者_Python百科w how to make the TextView object fill the screen, but can\'t get the actual letters to do the same. C

I'm trying to stretch text so that a given string fills the entire screen. I kno开发者_Python百科w how to make the TextView object fill the screen, but can't get the actual letters to do the same. Can anyone suggest a way to do this?


If that is some static text you could just strech it manually

yourTextView.setTextScaleX((float) 1.6 );  // set to what ever fits

you could scale that and check if the words break into two lines in your code.


Use a Webview. Format the text using this (html style):

style="text-align:justify"
0

精彩评论

暂无评论...
验证码 换一张
取 消