android - Java preferred line break in a String -
i have string this:
"speed1: 10 km/h, speed2: 20 km/h, speed3: 30 km/h, speed4: 40 km/h, speed5: 50 km/h"
i want display string in textview, can have variable width. on devices, hole string fits in 1 line. on other devices, 2-3 lines needed.
i want string broken @ comma- characters, parameters , values on same line.
is there special character in android that? (or have first let string drawn, count number of lines, , replace commas newline character).
maybe ugliest solution in world, how replacing "normal" spaces except ones after comma, unicode non-breaking space? ("\u00a0")?
Comments
Post a Comment