2

I am having a textview with multi line text. In some places textview is having webpage address like google.com yahoo.com etc.., Now because of multi line, wordwrap functionality is splitting google. in one line and com in other line, same is happening for yahoo. in one line and com in other line.

Is there any way to specify that some words in the string should not be splitted in android?

-RR..

Ron
  • 359
  • 6
  • 21

1 Answers1

1

you have to load your string as Html content. For Example, think that this your String

Android is a software stack for mobile devices that includes an operating system, middleware and key applications. <a>http://www.google.co.in</a> The Android SDK provides the tools and APIs necessary to begin developing applications on the Android platform using the Java programming language.

you have to put <a> tag to doesnot affect the wordwrap.

you have to load your String like this: textview.setText(Html.fromHtml(content_String));

Hope it helps.

Praveen
  • 90,477
  • 74
  • 177
  • 219
  • Thanks for the reply! But if i use then that string will be hyper linked. But i dont want this behaviour. The strings should not be hyperlinked and is there any way to tell android not to split some words during wrapping. – Ron Jul 23 '11 at 03:45