Code example for AlphabetIndexer

Methods: setCursor

1
	@Override 
	public void onLoadFinished(Loader<Cursor> loader, Cursor cursor) {
		ListView l = getListView();
		l.setFastScrollEnabled(false);
		adapter.swapCursor(cursor);
		indexer.setCursor(cursor);
		if(isResumed()) setListShown(true); 
		else setListShownNoAnimation(true); 
		l.setFastScrollEnabled(true);
	} 
	@Override 
	public void onLoaderReset(Loader<Cursor> loader) {
		adapter.swapCursor(null);
		indexer.setCursor(null);
	} 
} 
Stop searching for code, let great code find you!  Add Codota to your java IDE