diff options
Diffstat (limited to 'libraries/StickyListHeaders/library/src/se/emilsjolander/stickylistheaders/SectionIndexerAdapterWrapper.java')
-rw-r--r-- | libraries/StickyListHeaders/library/src/se/emilsjolander/stickylistheaders/SectionIndexerAdapterWrapper.java | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/libraries/StickyListHeaders/library/src/se/emilsjolander/stickylistheaders/SectionIndexerAdapterWrapper.java b/libraries/StickyListHeaders/library/src/se/emilsjolander/stickylistheaders/SectionIndexerAdapterWrapper.java new file mode 100644 index 000000000..ff7e293af --- /dev/null +++ b/libraries/StickyListHeaders/library/src/se/emilsjolander/stickylistheaders/SectionIndexerAdapterWrapper.java @@ -0,0 +1,32 @@ +package se.emilsjolander.stickylistheaders; + +import android.content.Context; +import android.widget.SectionIndexer; + +class SectionIndexerAdapterWrapper extends + AdapterWrapper implements SectionIndexer { + + final SectionIndexer mSectionIndexerDelegate; + + SectionIndexerAdapterWrapper(Context context, + StickyListHeadersAdapter delegate) { + super(context, delegate); + mSectionIndexerDelegate = (SectionIndexer) delegate; + } + + @Override + public int getPositionForSection(int section) { + return mSectionIndexerDelegate.getPositionForSection(section); + } + + @Override + public int getSectionForPosition(int position) { + return mSectionIndexerDelegate.getSectionForPosition(position); + } + + @Override + public Object[] getSections() { + return mSectionIndexerDelegate.getSections(); + } + +} |