{"id":13537959,"url":"https://github.com/tjerkw/Android-SlideExpandableListView","last_synced_at":"2025-04-02T04:32:08.815Z","repository":{"id":3685363,"uuid":"4755480","full_name":"tjerkw/Android-SlideExpandableListView","owner":"tjerkw","description":"A better ExpandableListView, with animated expandable views for each list item","archived":false,"fork":false,"pushed_at":"2019-10-31T20:53:26.000Z","size":6416,"stargazers_count":1971,"open_issues_count":46,"forks_count":739,"subscribers_count":165,"default_branch":"master","last_synced_at":"2025-03-24T14:08:56.816Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tjerkw.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-06-22T20:28:16.000Z","updated_at":"2025-03-13T07:31:16.000Z","dependencies_parsed_at":"2022-09-03T20:12:16.967Z","dependency_job_id":null,"html_url":"https://github.com/tjerkw/Android-SlideExpandableListView","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tjerkw%2FAndroid-SlideExpandableListView","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tjerkw%2FAndroid-SlideExpandableListView/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tjerkw%2FAndroid-SlideExpandableListView/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tjerkw%2FAndroid-SlideExpandableListView/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tjerkw","download_url":"https://codeload.github.com/tjerkw/Android-SlideExpandableListView/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246489442,"owners_count":20785879,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T09:01:05.292Z","updated_at":"2025-04-02T04:32:03.800Z","avatar_url":"https://github.com/tjerkw.png","language":"Java","funding_links":[],"categories":["Java","Libs"],"sub_categories":["\u003cA NAME=\"Widget\"\u003e\u003c/A\u003eWidget"],"readme":"# SlideExpandableListView for Android\n\n![Screenshot](https://github.com/tjerkw/Android-SlideExpandableListView/raw/master/raw/example-screens.png)\n\nNot happy with the Android ExpandableListView android offers? Want something like the Spotify app. This library allows you to have custom listview in wich each list item has an area that will slide-out once the users clicks on a certain button.\n\n## Features\n\n * Provides a better ExpandableListView usable for normal ListView's\n * Animates by default\n * Easy to use\n\nRepository at \u003chttps://github.com/tjerkw/Android-SlideExpandableListView/\u003e.\n\n## Usage\n\n### Layout\n\nUse a normal list view in your layout.\nYou may also use a ListActivity or ListFragment\n\n``` xml\n\u003cListView\n    android:id=\"@+id/list\"\n    android:layout_height=\"fill_parent\"\n    android:layout_width=\"fill_parent\" /\u003e\n```\n\nThe list item view should have a toggle button (Button view), and a target view that will be expanded.\nBy default the expandable view will be hidden. An when a user clicks the toggle button the\nexpandalbe view will slide out and be visible.\n\nFor example here below we have R.id.expandable_toggle_button Button view.\nAnd a R.id.expandable LinearLayout which will be expanded.\nNote that the expandable view does not have to be a LinearLayout,\nit can be any subclass of View.\n\n``` xml\n\u003c?xml version=\"1.0\" encoding=\"utf-8\"?\u003e\n\u003cLinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n              android:layout_width=\"fill_parent\"\n              android:layout_height=\"wrap_content\"\n              android:orientation=\"vertical\"\u003e\n\t\u003cRelativeLayout\n\t\t\tandroid:layout_width=\"fill_parent\"\n\t\t\tandroid:layout_height=\"wrap_content\"\n\t\t\tandroid:orientation=\"horizontal\"\u003e\n\n\t\t\u003cTextView\n\t\t\t\tandroid:layout_width=\"fill_parent\"\n\t\t\t\tandroid:layout_height=\"fill_parent\"\n\t\t\t\tandroid:id=\"@+id/text\"\n\t\t\t\tandroid:text=\"Hello World\"/\u003e\n\n\t\t\u003c!-- this is the button that will trigger sliding of the expandable view --\u003e\n\t\t\u003cButton\n\t\t\t\tandroid:id=\"@+id/expandable_toggle_button\"\n\t\t\t\tandroid:text=\"More\"\n\t\t\t\tandroid:layout_width=\"wrap_content\"\n\t\t\t\tandroid:layout_height=\"wrap_content\"\n\t\t\t\tandroid:layout_alignBottom=\"@+id/text\"\n\t\t\t\tandroid:layout_alignParentRight=\"true\"\n\t\t\t\tandroid:layout_alignTop=\"@id/text\"/\u003e\n\n\t\u003c/RelativeLayout\u003e\n\n\t\u003c!-- this is the expandable view that is initially hidden and will slide out when the more button is pressed --\u003e\n\t\u003cLinearLayout\n\t\t\tandroid:layout_width=\"fill_parent\"\n\t\t\tandroid:layout_height=\"fill_parent\"\n\t\t\tandroid:orientation=\"horizontal\"\n\t\t\tandroid:id=\"@+id/expandable\"\n\t\t\tandroid:background=\"#000000\"\u003e\n\n\t\t\u003c!-- put whatever you want in the expandable view --\u003e\n\t\t\u003cButton\n\t\t\t\tandroid:layout_width=\"fill_parent\"\n\t\t\t\tandroid:layout_height=\"fill_parent\"\n\t\t\t\tandroid:layout_weight=\"0.5\"\n\t\t\t\tandroid:text=\"Action A\" /\u003e\n\n\t\t\u003cButton\n\t\t\t\tandroid:id=\"@+id/details\"\n\t\t\t\tandroid:layout_width=\"fill_parent\"\n\t\t\t\tandroid:layout_height=\"fill_parent\"\n\t\t\t\tandroid:layout_weight=\"0.5\"\n\t\t\t\tandroid:text=\"Action B\"/\u003e\n\n\t\u003c/LinearLayout\u003e\n\u003c/LinearLayout\u003e\n```\n\n### Wrap your ListAdapter\n\nIn order to provide the functionality you simply wrap your list adapter in a SlideExpandableListAdapter.\nThe adapter gets the ids to the more button, and the expandable view as parameters. This allows the adapter\nto find those views.\n\n``` java\n\t\tListView list = ... your list view\n\t\tListAdapter adapter = ... your list adapter\n\t\t// now simply wrap the adapter\n\t\t// and indicate the ids of your toggle button\n\t\t// and expandable view\n\t\tlist.setAdapter(\n\t\t\tnew SlideExpandableListAdapter(\n\t\t\t\tadapter,\n\t\t\t\tR.id.expandable_toggle_button,\n\t\t\t\tR.id.expandable\n\t\t\t)\n\t\t);\n```\n\n### Use the SlideExpandableListView or ActionSlideExpandableListView\n\nIn order to simplify the usage of this library, you can also use the mentioned ListViews directly in your\nlayout xml file. The view itself will make sure the ListAdapter is wrapped in a SlideExpandableListAdapter.\n\nSee the sample app for usage information.\n\n### Including In Your Project\n\nAdd the library as a gradle dependency to your project.\n\n## Pull Requests\n\nIf you have any contributions I am gladly to review them and use them if they make sense.\n\n## Changelog\n\n### v1.1.0\n\n* Added ActionSlideExpandableListView for easier event listening, see the sample app\n* Updated the sample app to also contain event handling logic (Solved issue #3)\n* Solved the issue with random views being expanded, due to recycling of views was not properly handled\n* Solved more issues #1 #2\n\n### v1.0.0\n\n* First release!\n\n## Acknowledgments\n\n* [TjerkWolterink] (http://about.me/tjerkw), about me (https://github.com/tjerkw), my linked in (http://www.linkedin.com/in/tjerkwolterink)\n* [Udinic] (https://github.com/Udinic/SmallExamples/tree/master/ExpandAnimationExample), his blog (http://udinic.wordpress.com/2011/09/03/expanding-listview-items/) contains the initial idea\n\n## License\n\nLicensed under the [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.html)\n\n[![githalytics.com alpha](https://cruel-carlota.pagodabox.com/789c42a6ae45661a79e6e2695942ef65 \"githalytics.com\")](http://githalytics.com/tjerkw/Android-SlideExpandableListView)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftjerkw%2FAndroid-SlideExpandableListView","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftjerkw%2FAndroid-SlideExpandableListView","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftjerkw%2FAndroid-SlideExpandableListView/lists"}