If your project requirements do not allow you to use a line-break or a custom "FlowLayout" type of layout, you can create a custom View by extending TextView with a custom method to apply a custom line-wrapping scheme.
// String text must contain a portion between
// <unwrappable></unwrappable> tags.
public void setCustomWrappedText(String text) {
final String OPEN_TAG = "<unwrappable>";
final String CLOSE_TAG = "</unwrappable>";
// Unwrappable string not yet set, find it, between <unwrappable></unwrappable>
// tags, strip out the tags, and set prefix and suffix.
int index = text.indexOf(OPEN_TAG);
int index2 = text.indexOf(CLOSE_TAG);
String prefix = text.substring(0, index);
String unwrappable = text.substring(index + OPEN_TAG.length(), index2);
String suffix = text.substring(index2 + CLOSE_TAG.length());
// Contents already fit on one line, do nothing.
this.setText(prefix + unwrappable + suffix);
int lines = this.getLineCount();
if (lines < 2)
return;
// Set content prefix, ie. text _before_ unwrappable appears, and count lines.
this.setText(prefix);
lines = this.getLineCount();
// Set content to prefix _with_ unwrappable (no suffix), and count lines.
this.setText(prefix + unwrappable);
if (this.getLineCount() > lines) // Text has wrapped inside unwrappable, insert a line break to prevent.
this.setText(prefix + "\n" + this.unwrappable + suffix);
else // Text may or may not wrap _after_ unwrappable, we don't care.
this.setText(prefix + this.unwrappable + suffix);
}