Package eltos.simpledialogfragment.list
Class AdvancedSectionAdapter<T>
java.lang.Object
android.widget.BaseAdapter
eltos.simpledialogfragment.list.AdvancedAdapter<T>
eltos.simpledialogfragment.list.AdvancedSectionAdapter<T>
- All Implemented Interfaces:
android.widget.Adapter
,android.widget.Filterable
,android.widget.ListAdapter
,android.widget.SectionIndexer
,android.widget.SpinnerAdapter
public abstract class AdvancedSectionAdapter<T>
extends AdvancedAdapter<T>
implements android.widget.SectionIndexer
An extension of AdvancedAdapter that provides a section indexer
Created by eltos on 02.02.2017.
-
Nested Class Summary
Nested classes/interfaces inherited from class eltos.simpledialogfragment.list.AdvancedAdapter
AdvancedAdapter.AdvancedFilter, AdvancedAdapter.ItemIdentifier<Item>
-
Field Summary
Fields inherited from class eltos.simpledialogfragment.list.AdvancedAdapter
CHOICE_MODE_MULTIPLE, CHOICE_MODE_NONE, CHOICE_MODE_SINGLE
Fields inherited from interface android.widget.Adapter
IGNORE_ITEM_VIEW_TYPE, NO_SELECTION
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
getPositionForSection
(int section) int
getSectionForPosition
(int position) Object[]
abstract String
getSectionTitle
(T object) Overwrite this method to return the section title corresponding with the given object.void
Methods inherited from class eltos.simpledialogfragment.list.AdvancedAdapter
filterItems, getCheckedItemCount, getCheckedItemIds, getCheckedItemOriginalPositions, getCheckedItems, getCount, getData, getFilter, getItem, getItemId, getView, highlight, highlight, isItemChecked, setAllItemsChecked, setChoiceMode, setData, setData, setData, setData, setDataAndIds, setDataAndIds, setItemChecked, setItemChecked, setItemsCheckedFromIds, setItemsCheckedFromIds, toggleChecked
Methods inherited from class android.widget.BaseAdapter
areAllItemsEnabled, getAutofillOptions, getDropDownView, getItemViewType, getViewTypeCount, hasStableIds, isEmpty, isEnabled, notifyDataSetInvalidated, registerDataSetObserver, setAutofillOptions, unregisterDataSetObserver
-
Constructor Details
-
AdvancedSectionAdapter
public AdvancedSectionAdapter()
-
-
Method Details
-
notifyDataSetChanged
public void notifyDataSetChanged()- Overrides:
notifyDataSetChanged
in classAdvancedAdapter<T>
-
getPositionForSection
public int getPositionForSection(int section) - Specified by:
getPositionForSection
in interfaceandroid.widget.SectionIndexer
-
getSectionForPosition
public int getSectionForPosition(int position) - Specified by:
getSectionForPosition
in interfaceandroid.widget.SectionIndexer
-
getSections
- Specified by:
getSections
in interfaceandroid.widget.SectionIndexer
-
getSectionTitle
Overwrite this method to return the section title corresponding with the given object. Equal and consecutive titles are automatically combined to sections- Parameters:
object
- an object from the underlying data set- Returns:
- a title representing the objects section (e.g. its first letter)
-