by paolorotolo

Expandable Height ListView for Android

211 Stars 43 Forks Last release: Not found Apache License 2.0 7 Commits 0 Releases

Available items

No Items, yet!

The developer of this repository has not created any items for sale yet. Need a bug fixed? Help with integration? A different license? Create a request here:


Android Library to put a ListView inside a ScrollView without collapsing.

Maven Central Android Arsenal

How to use

Add this to your build.gradle: ```java repositories { mavenCentral() }

dependencies { compile 'com.github.paolorotolo:expandableheightlistview:1.0.0' } ```

Add ExpandableHeightListView instead of ListView in your xml files:

    <com.github.paolorotolo.expandableheightlistview.expandableheightlistview android:id="@+id/expandable_listview" android:layout_width="fill_parent" android:layout_height="wrap_content" android:padding="8dp">

Expand ExpandableHeightListView programmatically: ```java ExpandableHeightListView expandableListView = (ExpandableHeightListView) findViewById(R.id.expandable_listview);


// This actually does the magic expandableListView.setExpanded(true);

It also works well with GridView.

Just use this instead:



See it in action: download test .apk here.

Also check the example app's sources here on GitHub (ExpandableHeightListViewExample).

Wait, what?

Well, did you ever try to put a ListView inside a ScrollView?

This is what happens.

And this is what you can do with ExpandableHeightListView.

Inspired by this answer on StackOverflow.

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.