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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T14:57:15+00:00 2026-06-07T14:57:15+00:00

My layout is a ScrollView with some TextView and other controls and also an

  • 0

My layout is a ScrollView with some TextView and other controls and also an ExpandableListView.

What I want to do is When Expanding the ExpandableListView the controls which are below it move down and again upon collapsing, all the controls move up and only Group of Expendables become Visible.

The problem is when using wrap_content for expandView’s Height the expanding of it shows nothing and just the indicator (little arrow) shows that it’s expanded, and when explicitly use some numbers eg. 200dp, the lowest items of expandView not shown. (Because of using two Scrolling widget together).

Here’s my simplified layout.

<ScrollView
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:ignore="HardcodedText" >
    <LinearLayout>
       //some controls
    </LinearLayout>

    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content" >

        <ExpandableListView
            android:id="@+id/lstDrugs"
            android:layout_width="match_parent"

//HERE is the point that wrap_content only shows the groups header

            android:layout_height=**"wrap_content"**
            android:layout_alignParentLeft="true"
            android:layout_alignParentTop="true"
            android:divider="@drawable/dividergradient"
            android:dividerHeight="2dp" >
        </ExpandableListView>

        <Button
            android:id="@+id/btnAddDrug"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_below="@id/lstDrugs"
            android:text="Add" />
    </RelativeLayout>
</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-07T14:57:16+00:00Added an answer on June 7, 2026 at 2:57 pm

    I’ve just found my answer in this thread.

    The problem is with using List inside ScrollView. To handle it you should use a layout other than the ScrollView (eg. LinearLayout) and add other widgets as Header and Footer of the list. This would enable the scrolling of the view and also expanding of the List.

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

Sidebar

Related Questions

I have a layout where I have a ScrollView and some stuffs. It looks
Simple problem: With the XML layout shown below, I have some views wrapped in
I'm just looking to setup a simple TextView wrapped in a ScrollView which will
I want to create a layout in which two bars , one at top
I want to make something like the one below. However for some reason, the
I have some layout file which Lint is giving me the following warning about:
So my layout looks basically like this: <ScrollView> <RelativeLayout> <BunchOfViews/> <ImageView android:layout_alignParentBottom=true/> </RelativeLayout> </ScrollView>
One of our views has a ScrollView as its root layout. When the device
My Layout structure is like this <LinearLayout> <scrollview> <RelativeLayout> <scrollview> ... ... </scrollview> </RelativeLayout>
My Current Layout is <?xml version=1.0 encoding=utf-8?> <ScrollView android:id=@+id/scrMain android:layout_width=fill_parent android:layout_height=match_parent android:layout_gravity=top android:fillViewport=true >

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.