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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T11:29:16+00:00 2026-06-05T11:29:16+00:00

i have a couple list items. one works, the other one doesn’t, and they

  • 0

i have a couple list items. one works, the other one doesn’t, and they both look fairly identical. this really should be a game of “spot the difference” in the XML files but i can’t, for the life of me, figure out what’s wrong. one of the list items is perfect and the other refuses to justify some of the Views on the right side of the layout, as indicated in the xml. here’s what they each look like with code included.

^ list_view_item_2.xml:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:minHeight="?android:attr/listPreferredItemHeight"
    android:padding="5dp">
    <TextView
        android:id="@+id/item_text_product"
        android:textSize="20sp"
        android:layout_weight="1"
        android:layout_height="wrap_content"
        android:layout_width="0dp"/>
    <TableLayout
        android:layout_width="wrap_content"
        android:layout_height="wrap_content">
        <TableRow>
            <TextView
                android:id="@+id/item_text_total"
                android:gravity="right"
                android:textStyle="bold"
                android:layout_span="2"
                android:layout_height="wrap_content"
                android:layout_width="wrap_content"/>
        </TableRow>
        <TableRow>
            <TextView
                android:id="@+id/item_text_units"
                android:gravity="right"
                android:textStyle="bold"
                android:layout_height="wrap_content"
                android:layout_width="wrap_content"/>
            <TextView
                android:id="@+id/item_text_uom"
                android:gravity="right"
                android:textStyle="bold"
                android:layout_height="wrap_content"
                android:layout_width="wrap_content"/>
        </TableRow>
        <TableRow>
            <TextView
                android:id="@+id/text_acog"
                android:text="COG:"
                android:gravity="right"
                android:textStyle="bold"
                android:layout_height="wrap_content"
                android:layout_width="wrap_content"/>
            <TextView
                android:id="@+id/item_text_acog"
                android:paddingLeft="1sp"
                android:gravity="right"
                android:textStyle="bold"
                android:layout_height="wrap_content"
                android:layout_width="wrap_content"/>
        </TableRow>
    </TableLayout>
</LinearLayout>

This next layout is the one that works.

^ inventory_child_item.xml:
and the code looks identical, for the most part…

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:minHeight="?android:attr/listPreferredItemHeight"
    android:padding="5dp">
    <TextView
        android:id="@+id/ici_site"
        android:textSize="20sp"
        android:layout_weight="1"
        android:layout_height="wrap_content"
        android:layout_width="0dp"/>
    <TableLayout
        android:layout_width="wrap_content"
        android:layout_height="wrap_content">
        <TableRow>
            <TextView
                android:id="@+id/ici_units"
                android:gravity="right"
                android:textStyle="bold"
                android:layout_height="wrap_content"
                android:layout_width="wrap_content"/>
            <TextView
                android:id="@+id/ici_uom"
                android:paddingLeft="1sp"
                android:gravity="right"
                android:textStyle="bold"
                android:layout_height="wrap_content"
                android:layout_width="wrap_content"/>
        </TableRow>
        <TableRow>
            <TextView
                android:id="@+id/ici_total"
                android:gravity="right"
                android:textStyle="bold"
                android:layout_span="2"
                android:layout_height="wrap_content"
                android:layout_width="wrap_content"/>
        </TableRow>
        <TableRow>
            <TextView
                android:id="@+id/ici_price"
                android:gravity="right"
                android:textStyle="bold"
                android:layout_span="2"
                android:layout_height="wrap_content"
                android:layout_width="wrap_content"/>
        </TableRow>
    </TableLayout>
</LinearLayout>
  • 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-06-05T11:29:17+00:00Added an answer on June 5, 2026 at 11:29 am

    You need to set match_parent to ListView

    like:

    android:layout_width="match_parent"

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

Sidebar

Related Questions

I have a string list (TStrings) that has a couple thousand items in it.
I have defined a layer-list with a couple of items on an xml file.
I have a couple un-ordered lists on my page. Both lists use list-style: disc
I have a couple of lists like this: <ul> <li class=list-header>Header</li> <li>Item 1</li> <li>Item
I have two generic Lists, one called Featured and the other called Filtered. List<Content>
I have couple of questions about AS3 variables handling by AVM/compiler/scope .1. This code
I have a listbox which has couple of items. When double clicked on each
I have <ul> tag, in that I have couple of <li> items. When I
Urgh, I have spent the last couple of hours on this now. I normally
i have been asked to develop a feature of cloning list items in sharepoint.

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.