Code example for AlphabetIndexer

0
	public Object[] getSections() {
		return sIndexer.getSections();
	} 
 
	private SectionIndexer CreateIndexer(Cursor cursor) {
		return new AlphabetIndexer(cursor, cursor.getColumnIndex("name"),
				"АБВГДЕЁЄЖЗИIЇЙКЛМНОПРСТУФХЦЧШЩЫЬЭЮЯ"); 
	} 
	 
	public boolean setViewValue(View view, Cursor cursor, int columnIndex) {
		if (view.getId() == R.id.imgClientDoc) {
			if (cursor.getInt(columnIndex) > 0) { 
				((ImageView) view).setImageResource(R.drawable.document);
			} else { 
				((ImageView) view).setImageBitmap(null);
			} 
			return true; 
		} else return false; 
	} 
 
}