當前位置: 首頁>>代碼示例>>Java>>正文


Java SectionIndexer.getSections方法代碼示例

本文整理匯總了Java中android.widget.SectionIndexer.getSections方法的典型用法代碼示例。如果您正苦於以下問題:Java SectionIndexer.getSections方法的具體用法?Java SectionIndexer.getSections怎麽用?Java SectionIndexer.getSections使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在android.widget.SectionIndexer的用法示例。


在下文中一共展示了SectionIndexer.getSections方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: setAdapter

import android.widget.SectionIndexer; //導入方法依賴的package包/類
public void setAdapter(RecyclerView.Adapter adapter) {
    if (adapter instanceof SectionIndexer) {
        adapter.registerAdapterDataObserver(this);
        mIndexer = (SectionIndexer) adapter;
        mSections = (String[]) mIndexer.getSections();
    }
}
 
開發者ID:myinnos,項目名稱:AlphabetIndex-Fast-Scroll-RecyclerView,代碼行數:8,代碼來源:IndexFastScrollRecyclerSection.java

示例2: setAdapter

import android.widget.SectionIndexer; //導入方法依賴的package包/類
public void setAdapter(ListAdapter adapter) {
	if(adapter instanceof SectionIndexer) {
		mSectionIndexer = (SectionIndexer) adapter;
		mSections = (String[]) mSectionIndexer.getSections();
	} else {
		throw new IllegalArgumentException("adapter must implement SectionIndexer interface.");
	}
}
 
開發者ID:houjinyun,項目名稱:PinnedHeaderView,代碼行數:9,代碼來源:IndexScroller.java

示例3: setListView

import android.widget.SectionIndexer; //導入方法依賴的package包/類
public void setListView(GridView list){
	this.list = list;
	sectionIndexer = (SectionIndexer) list.getAdapter();

	Object[] sectionsArr = sectionIndexer.getSections();
	sections = new String[sectionsArr.length];
	for(int i=0; i<sectionsArr.length; i++){
		sections[i] = sectionsArr[i].toString();
	}
	this.invalidate();
}
 
開發者ID:mpakarlsson,項目名稱:ilearnrw-reader,代碼行數:12,代碼來源:SideSelector.java

示例4: setListView

import android.widget.SectionIndexer; //導入方法依賴的package包/類
/**
 * Adds the section index to the ListView.
 * 
 * @param _list
 *            The ListView with which the section index is to be associated.
 */

public void setListView(ListView _list) {
	list = _list;
	selectionIndexer = (SectionIndexer) _list.getAdapter();

	Object[] sectionsArr = selectionIndexer.getSections();
	sections = new String[sectionsArr.length];
	for (int i = 0; i < sectionsArr.length; i++) {
		sections[i] = sectionsArr[i].toString();
	}

}
 
開發者ID:saurabh2590,項目名稱:EasyAccess,代碼行數:19,代碼來源:SideSelector.java

示例5: setAdapter

import android.widget.SectionIndexer; //導入方法依賴的package包/類
public void setAdapter(Adapter adapter) {
    if (adapter instanceof SectionIndexer) {
        mIndexer = (SectionIndexer) adapter;
        mSections = (String[]) mIndexer.getSections();
    }
}
 
開發者ID:jathak,項目名稱:sflauncher,代碼行數:7,代碼來源:IndexScroller.java

示例6: setAdapter

import android.widget.SectionIndexer; //導入方法依賴的package包/類
public void setAdapter(Indexer adapter) {
	mIndexer = (SectionIndexer) adapter;
	mSections = (String[]) mIndexer.getSections();
}
 
開發者ID:sylversky,項目名稱:IndexableListView,代碼行數:5,代碼來源:IndexScroller.java

示例7: setAdapter

import android.widget.SectionIndexer; //導入方法依賴的package包/類
public void setAdapter(Adapter adapter) {
	if (adapter instanceof SectionIndexer) {
		mIndexer = (SectionIndexer) adapter;
		mSections = (String[]) mIndexer.getSections();
	}
}
 
開發者ID:tengbinlive,項目名稱:info_demo,代碼行數:7,代碼來源:IndexScroller.java


注:本文中的android.widget.SectionIndexer.getSections方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。