Code example for AlphabetIndexer

Methods: getSectionForPosition

1
			public int getPositionForSection(int section) {
				return indexer.getPositionForSection(section);
			} 
			@Override 
			public int getSectionForPosition(int position) {
				return indexer.getSectionForPosition(position);
			} 
		}; 
		setListAdapter(adapter);
	} 
	@Override 
	public void onListItemClick(ListView l, View v, int position, long id) {
		startActivity((new Intent(getActivity(),PackageManagerActivity.class)).putExtra("command","info").putExtra("package",((TextView)v.findViewById(R.id.package_name)).getText()));
	} 
	@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);