shmuelp
shmuelp

Reputation: 1276

Add newlines to a text resource in Android?

I have a custom Dialog that contains only a TextView to display some text in my application. The documentation lists that only the b, i, u, tt, big, small, sup, sub, and strike tags are supported. I really need to add some newlines for readability. Do I need to change to a more complicated layout, or is there some way to encode newlines in the resource? I tried adding br tags, but that did not help.

Upvotes: 5

Views: 9629

Answers (1)

shmuelp
shmuelp

Reputation: 1276

On a lark, I tried adding \n to my resource, and happily discovered that it added a newline! I hope this saves someone else the trouble.

Upvotes: 26

Related Questions