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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T22:51:54+00:00 2026-05-18T22:51:54+00:00

I have a listview with a custom adapter in which I have 3 textview

  • 0

I have a listview with a custom adapter in which I have 3 textviews, two are next to each other and one is below the others. The problem I am running into though, is when the first textview extends, it pushes the other textview off the screen.

I have not been able to successfully get this to work, here is an example of what’s happening:

alt text

As you can see when the first textview gets too long, it then pushes the other text off the screen. I would like it so it wraps but the date textview is also showing. It should also be functional in horizontal view.

Here’s the listview adapter code:

<RelativeLayout android:id="@+id/vw1" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:orientation="horizontal"
android:descendantFocusability="blocksDescendants" xmlns:android="http://schemas.android.com/apk/res/android">


<TextView android:id="@+id/liName" android:textSize="17sp"
    android:textColor="#333" android:layout_width="wrap_content"
    android:layout_height="wrap_content" android:gravity="left"
    android:layout_gravity="left" />
<TextView android:id="@+id/liDate" android:textSize="12sp"
    android:textColor="#666" android:layout_width="fill_parent"
    android:layout_height="wrap_content" android:gravity="right"
    android:layout_gravity="right" android:width="60sp" android:layout_toRightOf="@+id/liName" />

<TextView android:id="@+id/liNum" android:textSize="12sp"
    android:textColor="#666" android:layout_width="fill_parent"
    android:layout_height="wrap_content" android:layout_below="@+id/liName" />


</RelativeLayout>
  • 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-18T22:51:54+00:00Added an answer on May 18, 2026 at 10:51 pm

    I am assuming that the text view being pushed is the liDate one.
    You need to put this one before the liName in your layout and set the width to “wrap_content” and align it right. Then you lace the liName to the left of it with “fill_parent” width
    So it would look like this:

    <RelativeLayout android:id="@+id/vw1" android:layout_width="fill_parent"
    android:layout_height="wrap_content" android:orientation="horizontal"
    android:descendantFocusability="blocksDescendants" xmlns:android="http://schemas.android.com/apk/res/android">
    
    
    <TextView android:id="@+id/liDate" android:textSize="12sp"
        android:textColor="#666" android:layout_width="wrap_content"
        android:layout_height="wrap_content" android:width="60sp" 
        android:layout_alignParentRight="true" />
    <TextView android:id="@+id/liName" android:textSize="17sp"
        android:textColor="#333" android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_toLeftOf="@id/liDate" />
    
    <TextView android:id="@+id/liNum" android:textSize="12sp"
        android:textColor="#666" android:layout_width="fill_parent"
        android:layout_height="wrap_content" android:layout_below="@+id/liName" />
    

    Hope this is what you meant

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

Sidebar

Related Questions

I have a ListView with custom adapter which is populated from local sqlite database.
I have one custom ListView called AreasListView which I've included in the XML file.
I have a custom ListView Adapter , with which I'm creating rows for a
i have a ListView for which i have made a custom adapter which extends
I have made a custom listView which which extends ListActivity and each row contains
I have a custom ListView adapter which implements an ImageThreadLoader class. Unfortunately, the class
I have a ListView which uses a custom adapter to display rows of data.
I have ListView with custom Adapter which supplies View to ListView in this way:
SOLVED BELOW See below for solution I have a ListView with a custom adapter
I have a ListView with custom Adapter . To be honest, I have many

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.