Code example for AlphabetIndexer

public final class AppCursorAdapter extends SimpleCursorAdapter implements SectionIndexer {
	private final AlphabetIndexer alphaIndexer;
	public AppCursorAdapter(Context context, int layout, Cursor c, String[] from, int[] to) {
		super(context, layout, c, from, to);
		alphaIndexer = new AlphabetIndexer(c, 1, " ABCDEFGHIJKLMNOPQRSTUVWXYZ");
	public int getPositionForSection(int section) {
		return alphaIndexer.getPositionForSection(section);
	public int getSectionForPosition(int position) {
		return alphaIndexer.getSectionForPosition(position);
	public Object[] getSections() {
		return alphaIndexer.getSections();
Connect your IDE to all the code out there  Get Codota for Java