textview '\n' not causing carraige return

by NFSpeedypur » Thu, 12 Mar 2009 11:04:20 GMT


Sponsored Links
 I am very confused.  I have brought in data from a database in a
string format.  This data is something like "Hello\nThis is a Test"
But it is not the '\n' as a carriage return and I am not sure why.  If
I add another part to the string with like ... string + "\nHello" it
works fine with the "\n".  So I am assuming that somehow it is
bringing in the \n as 2 characters from the database instead of 1.

I have tried to modify the database to be both varChars and texts for
the column and they both are the same result.  Is there something
straight forward I am missing?


David
--~--~---------~--~----~------------~-------~--~----~



textview '\n' not causing carraige return

by Mark Murphy » Thu, 12 Mar 2009 20:01:52 GMT


 


Bear in mind that "newlines" in Windows are \r\n, whereas in Linux and
OS X they are \n.

I do not know if that relates to your issue, but it's the first thing
that jumps to mind...

-- 
Mark Murphy (a Commons Guy)
 http://commonsware.com 
Android Training in Sweden --  http://www.sotrium.com/training.php 

--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


textview '\n' not causing carraige return

by NFSpeedypur » Thu, 12 Mar 2009 21:31:11 GMT


 Thats true and I have tested using a \r in there but it is on the
android emulator.  Its just odd because at one point it was working
fine.  I can make a new string and put a \n in and it works fine.  It
just does not like the one that is taken out of the database.  I have
tried both importing in my own database and creating a new one with
one row and both will not work.  Is there a setting on the Textview
that can disable this?

David





--~--~---------~--~----~------------~-------~--~----~



textview '\n' not causing carraige return

by Allan Rogge de Menezes Souza » Fri, 13 Mar 2009 01:47:07 GMT


 I'm a Newbie!!!

And not speak English


ALGUEM PODE ME AJUDAR

HELP ME!!!!

tenho um concurso pra participar e no sei nem o que seja Android ou que
linguagem usar

se for possvel gostaria de obter alguma ideia com vcs aqui
se  que tem brasileiro aqui!
olhei o grupo brasileiro mas no tem nada e os melhores contedos esto aqui
se vcs puderem me ajudar eu agradeo]]



Allan Rogge


Thanks

--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. first app - please check and tell suggestions

I tried the app and well.
My camera can't autofocus the picture I want to take (not to mention
that my camera even doesn't want to take a picture at first) but
suddenly, it took a picture.
And then well, I set the app for German as my native language and
English as the foreign language but in the game, it English was the
native language and Spain the foreign language. (it was Spain I
think?).

So still buggy it seems, but it's a great idea! So please go on! ;)

For info: I have a HTC Hero.

Ritchie Flick

--

2. Will Android 2.0 be open source?

Until such time, I am going to remove Verizon as an available carrier
for my Applications.





> > 

3. Android Zii EGG opinions

4. Ramos W7

5. How many people do you know that uses a cellphone?

6. Feature - What does everyone think of this!

7. NullPointerException android executable (Ubuntu)