Wrapping text horizontally
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.
精彩评论