Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4362: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4364: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4365: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4366: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
anddev.org • View topic - [Solved] Linebreak in Android

[Solved] Linebreak in Android

Put your problem here if it does not fit any of the other categories.

[Solved] Linebreak in Android

Postby Jesmiatka » Wed Mar 05, 2008 9:31 am

Hi guys!

I am kinda a freak who wants to see things in nice order with everything on a new line.
Now I wanted to use break lines, (HTML
, JAVA \n) but these don't work and just get printed on your screen.

For example:
I want to make a Toast that shows the inserted username and password. I want both of these on a seperate line.

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1.         Toast.makeText( Login.this,
  2.  
  3. "Username: " + username.getText() + " Password: " + password.getText(),
  4.  
  5. Toast.LENGTH_LONG).show();
Parsed in 0.012 seconds, using GeSHi 1.0.8.4


Simply adding \n doesn't work.. anyone knows how to add a break line in Android?
This also does not work in the setText of a TextView..
Jesmiatka
Senior Developer
Senior Developer
 
Posts: 164
Joined: Mon Feb 04, 2008 3:37 pm
Location: Netherlands

Top

Postby plusminus » Wed Mar 05, 2008 9:56 am

Hello Jesmiatka,

in a ProgressDialog "[font=Lucida Console]\n[/font]" works fine with me.

Just tried on a Toast and it works too :darrow: A, B and C are below each other:
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. Toast.makeText(this, "A\nB\nC", Toast.LENGTH_SHORT).show();
Parsed in 0.010 seconds, using GeSHi 1.0.8.4


Regards,
plusminus
Image
Image | Android Development Community / Tutorials
User avatar
plusminus
Site Admin
Site Admin
 
Posts: 2688
Joined: Wed Nov 14, 2007 8:37 pm
Location: Schriesheim, Germany

Postby Jesmiatka » Wed Mar 05, 2008 10:11 am

Uhrgg... it actually does.. what the hell :-P
Don't know what I tried but it works with setText aswell, close/delete topic ;-)
Jesmiatka
Senior Developer
Senior Developer
 
Posts: 164
Joined: Mon Feb 04, 2008 3:37 pm
Location: Netherlands

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: Yahoo [Bot] and 9 guests