开发者

Wrapping text horizontally

开发者 https://www.devze.com 2023-03-19 11:19 出处:网络
I\'m doing an app of a book and am trying to work out which layout to use so the text reads like an iPad/kindle where you swipe horizontally to turn the page. I\'ve used HorizontalScrollView, but is t

I'm doing an app of a book and am trying to work out which layout to use so the text reads like an iPad/kindle where you swipe horizontally to turn the page. I've used HorizontalScrollView, but is there a way 开发者_JS百科to get the layout to wrap the text into a new column that you then scroll onto? Thanks


It depends on how you are displaying your String. I would use a JTextArea and turn wrapping on. If you're using a JLabel, then I believe you can set the width and wrap the text in a <html> tag and it will automatically wrap.

0

精彩评论

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