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. T-mobile G1 for testing purposes

Hi guys,

I'm wondering whether for strangers it will be possible to buy the G1
and use it abroad for testing (and for enjoing Android ;) ).

I read that the device can be bought at full price 399$ but I think
that it will be unlocked..
Any idea on how to get a free device for testing purposes?

Thank you in advance!!!

AB
--~--~---------~--~----~------------~-------~--~----~

2. E-mail client on Emulator and G1?

Hi,

I can see E-mail client is not supported on the emulator? Yet, it does exist on 
G1 phone, as I was told (never seen a G1 phone though). 
Could you, please, enlight me on e-mail client: is it supported on emulator and 
to what extent and is it present on G1?

Thank you,
Nick

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

3. Feedback for my idea for Live Locations

4. Know about Android Developers

5. Any way to check free/busy status on onboard calendar programmatically?

6. Camera preview on G1 only works in landscape ?

7. Linking directly to an app in the market...