Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7431279
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T09:16:15+00:00 2026-05-29T09:16:15+00:00

i have a string that will get picked up by an intentExtra in my

  • 0

i have a string that will get picked up by an intentExtra in my next class and be set as the text for a multiline TextView. i was wodnering if there is a way to split the text up so they are under eachother, so i have this string:

maint = "Here is some info about nothing." +
                "Some more info about nothing." +
                "And a little more about nothing";

so usually they would be displayed in a textView like this:

Here is some info about nothing. Some more info about nothing. And a little more info about nothing.

is there a way so they would end the line after each one of those separate pieces were written into the TextView

like so:

Here is some info about nothing.
Some more info about nothing.
And a little more about nothing.

it just seems like it would be too much with a separate TextView for each of those separate sentences.

thanks in advance

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T09:16:16+00:00Added an answer on May 29, 2026 at 9:16 am

    Add a /n to where you want to have a newline.

    maint = "Here is some info about nothing.\n" +
            "Some more info about nothing.\n" +
            "And a little more about nothing";
    

    You could also format it using Html. Add a where you want a newline.

    maint = "Here is some info about nothing.</br>" +
            "Some more info about nothing.</br>" +
            "And a little more about nothing";
    

    If you format it with HTML, you need to parse it first before passing it to the textview:

    myTextView.setText(Html.fromHtml(maint));
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string that looks like this: Name1=Value1;Name2=Value2;Name3=Value3 Is there a built-in class/function
I have to write a function that will get a string and it will
I have a method that will receive a string , but before I can
I have a string that is HTML encoded: '''&lt;img class=&quot;size-medium wp-image-113&quot;\ style=&quot;margin-left: 15px;&quot; title=&quot;su1&quot;\
I have an input string that will look something like Monday 2:00 pm and
I have a text string that needs to become a DateTime object: Feb 10,
I have a string that will look something like this: I'm sorry the code
I have to make a query that will get records containing wd2 substring or
I have an app that will get the users gps location. The problem is
We have an application that will be collecting data and storing it in local

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.