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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T12:20:03+00:00 2026-05-31T12:20:03+00:00

I am trying to create a LinearLayout with two Listviews and can not see

  • 0

I am trying to create a LinearLayout with two Listviews and can not see the second Listview.
In the example you will see that I would like to have an image, then a title (for the first Listview), then the ListView. This should be followed by another title (for the second Listview) then the second ListView. I want both ListViews to scroll and not effect each other. Basically the idea is that a user can scroll through two different lists. This has been working nicely with just one ListView and just today I noticed I have a long forgotten Relativelayout (RelativeLayout01) that seems to being doing nothing.

<?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="fill_parent"
android:background="@drawable/bkgrnd"
android:orientation="vertical" >

<ImageView
    android:id="@+id/test_image"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_centerHorizontal="true"
    android:layout_gravity="center"
    android:paddingBottom="30sp"
    android:paddingTop="30sp"
    android:src="@drawable/title" />

<RelativeLayout
    android:id="@+id/RelativeLayout01"
    android:layout_width="716sp"
    android:layout_height="wrap_content" >
</RelativeLayout>

<TextView
    android:id="@+id/ title1_head"
    android:layout_width="fill_parent"
    android:layout_height="60sp"
    android:layout_centerHorizontal="true"
    android:gravity="center"
    android:text="@string/ title1_head"
    android:textColor="#ffffff"
    android:textSize="12pt" />

<RelativeLayout
    android:id="@+id/RelativeLayout02"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:gravity="center_horizontal" >

    <ListView
        android:id="@+id/ListView_Menu"
        android:layout_width="716sp"
        android:layout_height="wrap_content"
        android:layout_alignParentTop="true"
        android:layout_centerHorizontal="true"
        android:divider="@drawable/divider"
        android:listSelector="@drawable/textured" >
    </ListView>
</RelativeLayout>

<TextView
    android:id="@+id/title2_head"
    android:layout_width="fill_parent"
    android:layout_height="60sp"
    android:layout_centerHorizontal="true"
    android:gravity="center"
    android:text="@string/title2_head"
    android:textColor="#ffffff"
    android:textSize="12pt" />

<RelativeLayout
    android:id="@+id/RelativeLayout03"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:gravity="center_horizontal" >

    <ListView
        android:id="@+id/ListView1_Menu"
        android:layout_width="716sp"
        android:layout_height="wrap_content"
        android:layout_alignParentTop="true"
        android:layout_centerHorizontal="true"
        android:divider="@drawable/divider"
        android:listSelector="@drawable/textured" >
    </ListView>
</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-31T12:20:04+00:00Added an answer on May 31, 2026 at 12:20 pm

    What appears to be happening is the first ListView is doing exactly as you told it and filling all available space and you’re making the Layout more complicated. Use only 1 LinearLayout and use android:weight="0" for the header and non ListView views and android:weight="1" for your ListView views. The weight will help you to control the height of ListView views.

    If you want more granular control over each group of header and list wrap them in their own LinearLayout and try not to put a weight on the contents of this layout as it can affect performance.

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

Sidebar

Related Questions

I am trying to create a ListView that will be populated with the entries
Trying to create my first iPhone app that would play back audio. When I
I'm trying to use Java ( not XML ) to create a LinearLayout with
I'm trying to create a class that can be added to a Layout file,
I've been trying to create a layout like this: Now I'm not asking for
I am trying create a layout. There are several inner layouts that should like
I am trying to create a listview with balloons. Its like a threaded chat
I'm trying to create a music player that will be visible in all my
I am trying to create an interface, where two or more buttons will be
I've been trying to create a color LinearLayout object (1) within another LinearLayout object

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.