Search in sources :

Example 1 with AdapterWrapper

use of com.emilsjolander.components.stickylistheaders.AdapterWrapper in project ABPlayer by winkstu.

the class XStickyListHeadersView method wrapAdapter.

private AdapterWrapper wrapAdapter(ListAdapter adapter) {
    AdapterWrapper wrapper;
    if (adapter instanceof SectionIndexer) {
        wrapper = new SectionIndexerAdapterWrapper(getContext(), (StickyListHeadersAdapter) adapter);
    } else {
        wrapper = new AdapterWrapper(getContext(), (StickyListHeadersAdapter) adapter);
    }
    wrapper.setDivider(mDivider);
    wrapper.setDividerHeight(mDividerHeight);
    wrapper.registerDataSetObserver(mDataSetChangedObserver);
    wrapper.setOnHeaderClickListener(mAdapterHeaderClickListener);
    return wrapper;
}
Also used : SectionIndexerAdapterWrapper(com.emilsjolander.components.stickylistheaders.SectionIndexerAdapterWrapper) SectionIndexer(android.widget.SectionIndexer) StickyListHeadersAdapter(com.emilsjolander.components.stickylistheaders.StickyListHeadersAdapter) SectionIndexerAdapterWrapper(com.emilsjolander.components.stickylistheaders.SectionIndexerAdapterWrapper) AdapterWrapper(com.emilsjolander.components.stickylistheaders.AdapterWrapper)

Aggregations

SectionIndexer (android.widget.SectionIndexer)1 AdapterWrapper (com.emilsjolander.components.stickylistheaders.AdapterWrapper)1 SectionIndexerAdapterWrapper (com.emilsjolander.components.stickylistheaders.SectionIndexerAdapterWrapper)1 StickyListHeadersAdapter (com.emilsjolander.components.stickylistheaders.StickyListHeadersAdapter)1