Code example for ListView

Methods: getAdapter, setOnScrollListener

0
        } 
    } 
 
 
    private void getSections() { 
        Adapter adapter = mList.getAdapter();
        if (adapter instanceof HeaderViewListAdapter) {
            mListOffset = ((HeaderViewListAdapter)adapter).getHeadersCount();
            adapter = ((HeaderViewListAdapter)adapter).getWrappedAdapter();
        } 
        if (adapter instanceof SectionIndexer) {
            mListAdapter = (BaseAdapter) adapter;
            mSections = ((SectionIndexer) mListAdapter).getSections();
        } 
    } 
 
    public void onChildViewAdded(View parent, View child) {
        if (child instanceof ListView) {
            mList = (ListView)child;
 
            mList.setOnScrollListener(this);
            getSections(); 
        } 
    } 
 
    public void onChildViewRemoved(View parent, View child) {