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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T21:24:39+00:00 2026-06-03T21:24:39+00:00

I have 2 custom ListView Created as item layout + ArrayAdapter + My own

  • 0

I have 2 custom ListView Created as item layout + ArrayAdapter + My own ListView class.
Then I’m using this ListView in my main layout next way:

<MyListViewFirst
        android:id="@+id/MyListView1"
        android:layout_width="match_parent"
        android:layout_height="wrap_content" />

This MyListViewFirst contains Layout1 with one text field (on the right) and the other ListView – MyListViewSecond inside:

<MyListViewSecond
        android:id="@+id/MyListView2"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_gravity="center_vertical"
        android:layout_weight="18" />

When I see into Layout1 my TextView and MyListViewSecond are both fits the page not depending on how many rows MyListViewSecond contains.

But when I look into my main Layout at each MyListViewFirst element TextView does fit to the item, but MyListViewSecond doesn’t – it shows only a few elements.

Looks like it aligns to TextView height, and I need max height – MyListViewSecond with all inner items height.

So how can I get all items in the inner ListView be shown?

Example:
enter image description here

  • 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-03T21:24:40+00:00Added an answer on June 3, 2026 at 9:24 pm

    You really shouldn’t place a ListView inside another ListView. It’ll give you bad performance and it’s not a good solution for users either – they’ll find it hard to use. I’d advise you to reconsider your design and implement it in a better way that doesn’t use nested ListViews.

    This isn’t an answer to your question, but I don’t think anyone would gain from an actual answer since your design implementation would be very inefficient, hard to use and against the Android design guidelines.

    Maybe you should consider looking at the ViewPager, and see if you can somehow change your design to use that instead.

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

Sidebar

Related Questions

HI Guyz i have created a sectioned custom listview using baseadapter its working fine
I have created a custom tab layout which look like this,I want to make
I have created a custom listview using adapter. Each row of the list view
We have created custom listview by using the Base adapter. List view contains Text
I have created a custom ArrayAdapter to display data within ListView items from an
I have created a custom titlebar for all my listview activities using the following
I have created a custom listview that is populated using a row.xml file. Each
I have created a custom list view, each row has it's own custom selector,
Suppose we have this example: http://techdroid.kbeanie.com/2009/07/custom-listview-for-android.html with source code available here: http://code.google.com/p/myandroidwidgets/source/browse/trunk/Phonebook/src/com/abeanie/ How can
I have a listView with custom objects defined by the xml-layout below. I want

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.