Breaking text in Android's TextView -




i have text string

lorem ipsum dolor sed eiusmod tempor sit am.

which display on screen. phones can display whole sentence in single line, while others not wide , display sentence this:

lorem ipsum dolor sed eiusmod tempor sit

am.

which looks ugly. better break more evenly, this:

lorem ipsum dolor sed eiusmod tempor sit

tempor sit am.

how make sure textview never breaks text single word takes whole line?

remark: api 23 introduced breakstrategy attribute (see link) textview, solve problem. unfortunately, not supported lower versions. there work-around here?





wiki

Comments

Popular posts from this blog

Asterisk AGI Python Script to Dialplan does not work -

python - Read npy file directly from S3 StreamingBody -

kotlin - Out-projected type in generic interface prohibits the use of metod with generic parameter -