I have a string of text like this with few newline control characters.
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\nUt enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
When I use LeadingMarginSpan
on the TextView, it applies after every newline character.
^ This is the result I get from applying a LeadingMarginSpan
.
^ And this is the result I'd like to have.
Is there any way to ignore paragraphs in TextView
so we can just have a normal line break?
You can apply LeadingMarginSpan.Standard(inset, 0)
from 0
to the first new line only, so it doesn't apply to the rest of the paragraphs.