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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T17:49:27+00:00 2026-05-26T17:49:27+00:00

I am currently loading text into my app from an xml file from server.

  • 0

I am currently loading text into my app from an xml file from server.
However those text is assigned to TextView.
My Text are not align as per my need. i.e i want those text to be as microsoft word justification.

<TextView android:id="@+id/nvContent"
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"
      android:layout_marginBottom="5dip"
      android:layout_marginTop="5dip"
      android:layout_weight="1"
      android:gravity="fill"
     android:text="Inglot Cosmetics now in Kathmandu Inglot, which has been selling its products in over 240 stores all over the world is now here for you in Kathmandu. It has one of the most extensive colour ranges in cosmetics collections. Working with the best makeup artists, Inglot brings you the latest trends in colour, texture and form. Experiment with countless shades and combinations of face powder, blushers, eye shadows and lipsticks."
    android:textColor="#ff000000"
    android:textSize="14sp" />

The text is kind of long.
My app doesnt show text alignment as in the textview.
I want those text to be justified.
Is this possible? i read in stackoverflow.com that Android doesnt support text-aligment as justified.
Any alternatives. or should my xml file do something?

  • 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-26T17:49:28+00:00Added an answer on May 26, 2026 at 5:49 pm

    You can try:

     android:gravity="center"
    

    instead of

    android:gravity="fill"
    

    And also give some padding by android:padding.

    Final Solution:

     <TextView 
           android:id="@+id/nvContent"
           android:layout_width="fill_parent"
           android:layout_height="wrap_content"
           android:layout_marginBottom="5dip"
           android:layout_marginTop="5dip"
           android:padding="10dp"
           android:gravity="center"
           android:text="Inglot Cosmetics now in Kathmandu Inglot, which has been selling its products in over 240 stores all over the world is now here for you in Kathmandu. It has one of the most extensive colour ranges in cosmetics collections. Working with the best makeup artists, Inglot brings you the latest trends in colour, texture and form. Experiment with countless shades and combinations of face powder, blushers, eye shadows and lipsticks."
           android:textColor="#ff000000"
           android:textSize="14sp" />
    

    Output:
    I got the below output by using above XML layout:

    enter image description here

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

Sidebar

Related Questions

Currently I am loading data from a previous session into my application using the
I have application reads in data from text file. Recently I realized that I
My app (singe-page layout) receives data from the server and I want a nice
I am loading quite a lot of rich text into a RichTextBox (WPF) and
Problem: I don't know why my script is not loading a value into the
I'm having trouble loading data from sqlite database into a detailed view. The table
I have an HTML file that I am loading into a JTextPane which contains
I'm needing to load an XML document into PHP that comes from an external
I have problem with loading images from the Documents folder of iPhone application into
I m loading an external xml file . I m getting some node values,output

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.