Go Back   Android Forums > Android Discussion > Android Applications
Android Applications All the information you could ever want about Android Applications. Learn about apps and get help with them... all here! New apps can be found and announced in the Applications Announcements forum linked below.

Get excited for the Samsung Galaxy S5! Find everything you need and discuss it in our Galaxy S5 Forum!

test: Reply
LinkBack Thread Tools
Old November 15th, 2010, 12:51 PM   #1 (permalink)
Junior Member
Thread Author (OP)
Join Date: May 2010
Posts: 21
Carrier: Not Provided

Thanks: 1
Thanked 0 Times in 0 Posts
Default show multiple lines of text?


How do you use a TextView to show multiple lines of text in android?
I tried doing android:singleLine = "false" but that's not working

Here is my code

for(int i = 1; i <= 10; i++)
tv.setText("instant " + i + ": ");

so it should say

instant 1:
instant 2:
instant 3:
instant 4:
instant 5:
instant 6:
instant 7:
instant 8:
instant 9:
instant 10:

BUT, the emulator only showing

instant 10:

How can I achieve this? Thanks!

mathkid95 is offline  
Reply With Quote
sponsored links
Old April 16th, 2011, 08:02 AM   #2 (permalink)
New Member
Join Date: Apr 2011
Posts: 1
Carrier: Not Provided

Thanks: 0
Thanked 1 Time in 1 Post

that's impossible dude..
handrdoid is offline  
Reply With Quote
The Following User Says Thank You to handrdoid For This Useful Post:
alostpacket (April 16th, 2011)
Old April 16th, 2011, 11:35 AM   #3 (permalink)
Over Macho Grande?
alostpacket's Avatar
Join Date: Nov 2009
Location: NY
Posts: 7,873
Device(s): GlassXE, MotoX, N5, N4, N7'12, GNex, N1, SGT10.1, Revue, Xoom, Eris, OG Droid
Carrier: TMO

Thanks: 4,582
Thanked 3,563 Times in 1,522 Posts

uh lol ^

just do this:

Edit: err sorry needed coffee before i wrote that.

full code:
String myString ="";

for ( int i=0; i <= 10; i++ )
    myString += "instant " + i + ":\n";

\n is the unix newline character
alostpacket is offline  
Last edited by alostpacket; April 16th, 2011 at 11:50 AM.
Reply With Quote
achieve, android, instant, line, multiple, textview

Go Back   Android Forums > Android Discussion > Android Applications
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

All times are GMT -5. The time now is 11:48 PM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.