Communiquez avec les autres et partagez vos connaissances professionnelles

Inscrivez-vous ou connectez-vous pour rejoindre votre communauté professionnelle.

Suivre

What is the difference between Listview and expandablelistview in field of android?

Difference between Listview and expandablelistview in field of android

user-image
Question ajoutée par Faraz Ahmed khokhar , Android Developer , Hatf Research Projects & Technologies
Date de publication: 2013/10/22
Asif Javed
par Asif Javed , Software Engineer – [Mobile (Android, iPhone, Blackberry & WP 8), Web Developer] & SEO Expert , MetiCode [Pvt].LTD

ListView is a view group that displays a list of scrollable items. The list items are automatically inserted to the list using an Adapter that pulls content from a source such as an array or database query and converts each item result into a view that's placed into the list.

Tutorial: http://www.javacodegeeks.com/2013/06/android-listview-tutorial-and-basic-example.html

 

Expandable listview 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.

Expandable lists are able to show an indicator beside each item to display the item's current state (the states are usually one of expanded group, collapsed group, child, or last child). Use setChildIndicator(Drawable) or setGroupIndicator(Drawable) (or the corresponding XML attributes) to set these indicators (see the docs for each method to see additional state that each Drawable can have). The default style for an ExpandableListView provides indicators which will be shown next to Views given to the ExpandableListView. The layouts android.R.layout.simple_expandable_list_item_1 and android.R.layout.simple_expandable_list_item_2 (which should be used with SimpleCursorTreeAdapter) contain the preferred position information for indicators.

Tutorial: http://www.androidhive.info/2013/07/android-expandable-list-view-tutorial/

 

Please feel free to ask question regarding response of asked queries.

Thanks,

 

Asif Javed

Team Lead - Software Engineer (Mobile & Web) & SEO Expert

More Questions Like This

Avez-vous besoin d'aide pour créer un CV ayant les mots-clés recherchés par les employeurs?