aboutsummaryrefslogtreecommitdiffstats
path: root/libraries/StickyListHeaders/library/src/se/emilsjolander/stickylistheaders/SectionIndexerAdapterWrapper.java
diff options
context:
space:
mode:
authorDominik Schürmann <dominik@dominikschuermann.de>2014-01-02 21:10:08 +0100
committerDominik Schürmann <dominik@dominikschuermann.de>2014-01-02 21:10:08 +0100
commitf5da63f9882e1807c6bd2adb5205ad7482c45339 (patch)
tree95b034a7a80d2e3ea8343440d617db993f4fca59 /libraries/StickyListHeaders/library/src/se/emilsjolander/stickylistheaders/SectionIndexerAdapterWrapper.java
parent1d91804dc7943e7149d02141a46c3eb0763e2b94 (diff)
downloadopen-keychain-f5da63f9882e1807c6bd2adb5205ad7482c45339.tar.gz
open-keychain-f5da63f9882e1807c6bd2adb5205ad7482c45339.tar.bz2
open-keychain-f5da63f9882e1807c6bd2adb5205ad7482c45339.zip
New list with sticky list headers library
Diffstat (limited to 'libraries/StickyListHeaders/library/src/se/emilsjolander/stickylistheaders/SectionIndexerAdapterWrapper.java')
-rw-r--r--libraries/StickyListHeaders/library/src/se/emilsjolander/stickylistheaders/SectionIndexerAdapterWrapper.java32
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();
+ }
+
+}