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

  • Home
  • SEARCH
  • 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 7539965
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T07:31:14+00:00 2026-05-30T07:31:14+00:00

I have a list view in an Android application used to display an ArrayList

  • 0

I have a list view in an Android application used to display an ArrayList containing Strings and I can’t find any properties of the ListView that would allow me to align the text of the ListView Items to the right of it instead of the left. Any help would be great, thanks.

  • 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-30T07:31:16+00:00Added an answer on May 30, 2026 at 7:31 am

    The answer depends on how exactly do you build the list. If you use the the standard ArrayAdapter then you could use the constructor:

    ArrayAdapter<String>(Context, R.layout.aligned_right, values);
    

    where R.layout.aligned_right is a xml layout like this:

    <TextView xmlns:android="http://schemas.android.com/apk/res/android"
        android:id="@android:id/text1" 
        android:layout_width="fill_parent"  
        android:layout_height="wrap_content"                    
        android:textAppearance="?android:attr/textAppearanceLarge" 
        android:paddingLeft="6dip"
        android:minHeight="?android:attr/listPreferredItemHeight"
        android:gravity="right"/>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In my Android application, I have a simple list view with adapter. There's a
In my Android application I have used a Listview and in each element in
I have an Android app with a ListActivity in the main view. The list
It seems that android has enforced that a listview must have the name android:id=@android:id/list,
I have a databound list view and can set all the column widths manually
I have implemented an application on ListView in my application i have used getListView()
I have a ListView in my android application. If I flick up/down the ListView,
I am developing Android Application. In which i am having list view with text
In my Android application I have a ListView with 5 elements. I created a
I want to display a list view in my application. Each row should contain

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.