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. Nexus One 2n

Haloo permisi , numpang jualan ...

Nexus One 2nd 
- Kondisi mulus 95% mulus apik terawat
- fullset , pouch masih bagus 
- rooted froyo
- sd card 4gb

Harga 5.25 NETT include ongkir
Alasan jual ganti device

Lokasi Bandung , ary.ma...@ymail.com , 08122 1111 191 . 


Thank's

Ary Malik

-- 
"Indonesian Android Community [id-android]" 

2. Texturing a square with OpenGL ES

Alright, so I've got this OpenGL tutorial I'm basing from, my current
code is equivalent to Part II of it, which is here:
http://blog.jayway.com/2009/12/04/opengl-es-tutorial-for-android-%E2%80%93-part-ii-building-a-polygon/

The code for that can be downloaded here:
http://blog.jayway.com/wordpress/wp-content/uploads/2009/12/Tutorial_Part_II.zip

It leaves you with a white square, and I want to apply a texture to
it, which this tutorial series doesn't cover.  I found a site about
it, with a class called GLTextures, visible here:
http://tkcodesharing.blogspot.com/2008/05/working-with-textures-in-androids.html

I can't figure out the proper way to use the GLTextures class to apply
a texture to the square in the above tutorial.

-- 

3. Looking for Android Developer

4. Android JNI AttachCurrentThread throws an exception in java

5. Airplane mode & scheduling of PendingIntent(s) problems (Froyo Android OS 2.2).

6. what does this monkey script do??

7. intent filters created at runtime