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.
  • Constructor Details

    • AdvancedSectionAdapter

      public AdvancedSectionAdapter()
  • Method Details

    • notifyDataSetChanged

      public void notifyDataSetChanged()
      Overrides:
      notifyDataSetChanged in class AdvancedAdapter<T>
    • getPositionForSection

      public int getPositionForSection(int section)
      Specified by:
      getPositionForSection in interface android.widget.SectionIndexer
    • getSectionForPosition

      public int getSectionForPosition(int position)
      Specified by:
      getSectionForPosition in interface android.widget.SectionIndexer
    • getSections

      public Object[] getSections()
      Specified by:
      getSections in interface android.widget.SectionIndexer
    • getSectionTitle

      @Nullable public abstract String getSectionTitle(T object)
      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)