Android views can be made expandable by using an ExpandableListView, which extends ListView and allows two levels of items to be shown. This view is associated with an ExpandableListAdapter, which provides the items for the view.
An Expandable CardView can also be created by adding a dependency to the build.gradle file, adding drawable resources to the drawable folder, and working with the XML files.
See more results on Neeva
Summaries from the best pages on the web
ExpandableListView extends ListView
A view that shows items in a vertically scrolling two-level list. This differs from the ListView by allowing two levels: groups which can individually be expanded to show its children. The items come from the ExpandableListAdapter associated with this view.
ExpandableListView | Android Developers
For the information to be displayed in the ExpandableListView, we have to create an adapter, in this case a BaseExpandableListAdapterand implement the necessary methods as below: packagecom.distribution.fsrsolutions.nino;importandroid.content.Context;importandroid. view .LayoutInflater;importandroid. view . View ;importandroid. view .ViewGroup;importandroid.widget.BaseExpandableListAdapter;importandroid.widget.TextView;importjava.util.HashMap;importjava.util.
Android: How to do an Expandable List View with groups and subgroups ...