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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T12:39:41+00:00 2026-05-26T12:39:41+00:00

I am having trouble getting a ListView to display anything in my application. I

  • 0

I am having trouble getting a ListView to display anything in my application. I am sure the ListView‘s adapter is getting set correctly (and I can read out the data in it using Log.d to confirm), so I’m guessing the issue is in the XML layout. I have an autocomplete box and the button on the top of the screen, with the ListView underneath. Both the AutoComplete and the Button display fine and work correctly, however I see nothing whatsoever for the ListView.

The only thing I can think of at the moment is that I could be doing something weird with the LinearLayouts that prevent the ListView from displaying, or something similar. I’ve been reading all the docs I can on Android layouts, but haven’t run across anything that looks like it can help yet… Can someone help me figure out why the ListView is not being displayed at all?

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android" 
android:orientation="vertical"
android:layout_width="fill_parent" 
android:padding="5dp"
android:layout_height="match_parent">

<LinearLayout
        android:orientation="horizontal"
        android:layout_width="fill_parent" 
        android:layout_height="wrap_content"
        android:padding="5dp" android:weightSum="1">
        <com.myapp.CustomAutoCompleteTextView
                android:layout_height="wrap_content"
                android:layout_marginLeft="5dp"
                android:fadeScrollbars="false"
                android:id="@+id/autocomplete_itemname"
                android:layout_width="fill_parent"
                android:layout_weight="0.90"/>
            <Button android:text="Locate"
                android:layout_width="wrap_content"
                android:id="@+id/button_item_list_located_item"
                android:layout_height="wrap_content">
            </Button>
</LinearLayout>

<ListView android:id="@+id/selected_items_listview"
        android:layout_weight="1"
        android:layout_height="wrap_content"
        android:layout_width="match_parent">
    </ListView>

</LinearLayout>

Hierarchy Viewer output

  • 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-26T12:39:42+00:00Added an answer on May 26, 2026 at 12:39 pm

    Try changing the layout_height of your wrapping root LinearLayout to "fill_parent" instead of "match_parent"

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

Sidebar

Related Questions

I'm having trouble getting Twipsy to read the data attributes set on Twipsy-enabled element.
Hi guys I'm having trouble getting my code to correctly display html within the
I am having trouble getting my chat application working correctly. I have 2 textbox's,
I am having trouble getting set up with FLTK in Eclipse. I am trying
I'm having trouble getting any information to display from this query. Anyone know where
I am having trouble with with getting my application to function on android 1.5.
Having trouble getting the correct bounds for my iPad application when launching it in
having trouble getting multiple lines to work correctly in a mailto link In my
Having trouble getting the javascript alert to display from my code behind. c# -
I am having a lot of trouble getting an EditText within a ListView row

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.