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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T16:55:40+00:00 2026-06-16T16:55:40+00:00

i have a problem with a listView that is shown deep under many layers

  • 0

i have a problem with a listView that is shown deep under many layers of other layouts.
here the code.

<?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:layout_height="fill_parent">
    <TabHost
        android:layout_width="fill_parent"
        android:id="@android:id/tabhost"
        android:layout_weight="12"
        android:layout_height="wrap_content">
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:orientation="vertical"
            android:id="@+id/linearLayout1">
            <LinearLayout
                android:orientation="vertical"
                android:minWidth="25px"
                android:minHeight="25px"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:id="@+id/linearLayout5"
                android:gravity="top"
                android:layout_weight="1">
                <ScrollView
                    android:minWidth="25px"
                    android:minHeight="25px"
                    android:layout_width="fill_parent"
                    android:layout_height="fill_parent"
                    android:id="@+id/scrollView1"
                    android:scrollbars="none">
                    <LinearLayout
                        android:orientation="vertical"
                        android:minWidth="25px"
                        android:minHeight="25px"
                        android:layout_width="fill_parent"
                        android:layout_height="fill_parent"
                        android:id="@+id/linearLayout2">
                        <LinearLayout
                            android:orientation="vertical"
                            android:minWidth="25px"
                            android:minHeight="25px"
                            android:layout_width="fill_parent"
                            android:layout_height="wrap_content"
                            android:id="@+id/linearLayout3">
                            <TextView
                                android:text="@string/UTlbEqID"
                                android:textAppearance="?android:attr/textAppearanceSmall"
                                android:layout_width="fill_parent"
                                android:layout_height="wrap_content"
                                android:id="@+id/lbEqID" />
                            <TextView
                                android:textAppearance="?android:attr/textAppearanceSmall"
                                android:layout_width="fill_parent"
                                android:layout_height="wrap_content"
                                android:id="@+id/lbEqIDVar"
                                android:layout_marginLeft="15dp"
                                android:hint="wie sieht dass denn aus?" />
                            <TextView
                                android:text="@string/UTlbEqDesc"
                                android:textAppearance="?android:attr/textAppearanceSmall"
                                android:layout_width="fill_parent"
                                android:layout_height="wrap_content"
                                android:id="@+id/lbEqDesc"
                                android:layout_marginTop="5dp" />
                            <TextView
                                android:textAppearance="?android:attr/textAppearanceSmall"
                                android:layout_width="fill_parent"
                                android:layout_height="wrap_content"
                                android:id="@+id/lbEqDescVar"
                                android:layout_marginLeft="15dp"
                                android:hint="wie sieht dass denn aus?" />
                            <TextView
                                android:text="@string/UTlbTaskID"
                                android:textAppearance="?android:attr/textAppearanceSmall"
                                android:layout_width="fill_parent"
                                android:layout_height="wrap_content"
                                android:id="@+id/lbTaskID"
                                android:layout_marginTop="5dp" />
                            <TextView
                                android:textAppearance="?android:attr/textAppearanceSmall"
                                android:layout_width="fill_parent"
                                android:layout_height="wrap_content"
                                android:id="@+id/lbTaskIDVar"
                                android:layout_marginLeft="15dp"
                                android:hint="wie sieht dass denn aus?" />
                            <TextView
                                android:text="@string/UTlbTaskDesc"
                                android:textAppearance="?android:attr/textAppearanceSmall"
                                android:layout_width="fill_parent"
                                android:layout_height="wrap_content"
                                android:id="@+id/lbTaskDesc"
                                android:layout_marginTop="5dp" />
                            <TextView
                                android:textAppearance="?android:attr/textAppearanceSmall"
                                android:layout_width="fill_parent"
                                android:layout_height="wrap_content"
                                android:id="@+id/lbTaskDescVar"
                                android:layout_marginLeft="15dp"
                                android:hint="wie sieht dass denn aus?" />
                            <TextView
                                android:text="@string/UTlbTaskDate"
                                android:textAppearance="?android:attr/textAppearanceSmall"
                                android:layout_width="fill_parent"
                                android:layout_height="wrap_content"
                                android:id="@+id/lbTaskDate"
                                android:layout_marginTop="5dp" />
                            <TextView
                                android:textAppearance="?android:attr/textAppearanceSmall"
                                android:layout_width="fill_parent"
                                android:layout_height="wrap_content"
                                android:id="@+id/lbTaskDateVar"
                                android:layout_marginLeft="15dp"
                                android:hint="wie sieht dass denn aus?" />
                        </LinearLayout>
                        <LinearLayout
                            android:orientation="vertical"
                            android:minWidth="25px"
                            android:minHeight="25px"
                            android:layout_width="fill_parent"
                            android:layout_height="fill_parent"
                            android:id="@+id/linearLayout4">
                            <FrameLayout
                                android:id="@android:id/tabcontent"
                                android:layout_width="match_parent"
                                android:layout_height="fill_parent"
                                android:minWidth="25px"
                                android:minHeight="25px" />
                        </LinearLayout>
                    </LinearLayout>
                </ScrollView>
            </LinearLayout>
            <TabWidget
                android:id="@android:id/tabs"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:gravity="bottom" />
        </LinearLayout>
    </TabHost>
</LinearLayout>

well, the exact code of the listview, shwon via the tabcontent is this:

<?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:layout_height="fill_parent"
    android:isScrollContainer="true">
    <LinearLayout
        android:orientation="vertical"
        android:minWidth="25px"
        android:minHeight="25px"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:id="@+id/linearLayout1"
        android:layout_marginTop="20dp">
        <LinearLayout
            android:orientation="horizontal"
            android:minWidth="25px"
            android:minHeight="25px"
            android:layout_width="fill_parent"
            android:id="@+id/linearLayout2"
            android:layout_height="57dp">
            <Button
                android:text="@string/EmpTbtnEmploAdd"
                android:id="@+id/btnEmploAdd"
                android:layout_width="0dp"
                android:layout_height="fill_parent"
                android:layout_weight="1" />
            <Button
                android:text="@string/EmpTbtnEmploDel"
                android:layout_width="0dp"
                android:layout_height="fill_parent"
                android:id="@+id/btnEmploDel"
                android:layout_weight="1" />
        </LinearLayout>
        <ListView
            android:minWidth="25px"
            android:minHeight="25px"
            android:layout_width="fill_parent"
            android:id="@+id/lvEMPT"
            android:layout_height="162px"
            android:scrollbars="vertical"
            android:isScrollContainer="true"
            android:divider="@android:color/darker_gray"
            android:dividerHeight="1px" />
    </LinearLayout>
</LinearLayout>

my problem is, that this list won’t expand itself neither to the parent if i set its height attribute to fill_parent or match_parent nor to the size of all its items. it won’t even scroll whatever i do. The only thing it does ist responding to an click event, at least the only item shown(of 10) is getting hilightend blue (seems to be the main colour of an sgs+) as i click it, but there is no code behind that yet.

the list should resize itself at least to parent or to the number of items it has, up to a certain point, where it should be scrollable then.

how is it possible to get that thing work that way?

ps: you may wonder about the 162px, i tried to resize that damn thing by code but the height attribute is read only…

  • 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-16T16:55:41+00:00Added an answer on June 16, 2026 at 4:55 pm

    You are using ListView inside ScrollView. ListView can’t be used in such way.

    By the way, your layout is extremely inefficient – nested layouts are bad for perfomance. Consider using RelativeLayout instead of multiple LinerLayout

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

Sidebar

Related Questions

I have an activity which consists of a ListView . The problem is that
I have the problem that when i scrolling down the listview the hidden images
I have a ListView inside a AlertDialog, the problem I am having is that
I have a problem refreshing a ListView. I call my ListView Activity , I
I have a problem with list and listview. I started a project and added
I can't fix this problem on my listview template: i have the error as
I have the following problem. The background color in a ListView is set LightGreen
I have problem adding arraylist to list view, will explain about my problem here..
I have problem with repopulating form_upload after validation. Other input fields or selectboxes are
I have a problem in focusing the listview.In my form i have a listview

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.