mnagy
mnagy

Reputation: 1085

too much empty space at the end of a TextView after pasring text from XML

hello I have a small irritating problem I parse data from xml file picture and image and I put it in several textviews and imageViews my problem is when I put a very large text in a textView it creates to much space in the end of it .. when I set a large text manually to the code it doesn't create any empty space .. can anyone tell me how to solve this please ?!

Upvotes: 0

Views: 406

Answers (1)

Plato
Plato

Reputation: 2348

You can trim the whitespace from the beginning and end of a String like this :

String trimmedText = parsedText.trim();

Upvotes: 1

Related Questions