当前位置: 首页>>代码示例>>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;未经允许,请勿转载。