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 6542231
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T11:12:03+00:00 2026-05-25T11:12:03+00:00

I have to display some long text on a TextView, i tried to put

  • 0

I have to display some long text on a TextView, i tried to put it on strings.xml variable but had that problem Apostrophe not preceded by \. I used Java code to set the TextView but all the text must be on one line, and i want that the compiler detects return to line.

My question what is the best approach to make that ?
Thanks for helping.

  • 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-25T11:12:04+00:00Added an answer on May 25, 2026 at 11:12 am

    Use mTextSample.setText(Html.fromHtml(text)); Where you can show anything in your TextView using Html.fromHtml().

    Example (Some uses):

    String styledText = "This is <font color='red'>simple</font>.";
    textView.setText(Html.fromHtml(styledText), TextView.BufferType.SPANNABLE);
    

    .

    myTextView.setText(Html.fromHtml("<h2>Title</h2><br><p>Description here</p>"));
    

    And some uses :

    Android Html.fromHtml takes too long

    Display HTML Formatted String

    Happy coding 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a custom Dialog that contains only a TextView to display some text
I have a problem... I have some long hyperlinks that are plain text that
I have a JLabel that needs to display some html-formatted text. However, I want
I have panel that I have customized. I use it to display text. But
I have a TextView which displays a long text. I want to give some
I have some code to display a long list of languages inside Rails form
I display some objects that have thumbnails in two ways: one in a DataGridView,
i have two foreach loop to display some data, but i want to use
I have to develop an application that display some information about the possessor of
I have a JTable that I want to use to display some data (a

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.