android.widget
Class AlphabetIndexer

java.lang.Object
  extended by android.database.DataSetObserver
      extended by android.widget.AlphabetIndexer
All Implemented Interfaces:
SectionIndexer

public class AlphabetIndexer
extends DataSetObserver
implements SectionIndexer


Field Summary
protected  CharSequence mAlphabet
           
protected  int mColumnIndex
           
protected  Cursor mDataCursor
           
 
Constructor Summary
AlphabetIndexer(Cursor cursor, int sortedColumnIndex, CharSequence alphabet)
           
 
Method Summary
protected  int compare(String word, String letter)
           
 int getPositionForSection(int sectionIndex)
           
 int getSectionForPosition(int position)
           
 Object[] getSections()
           
 void onChanged()
           
 void onInvalidated()
           
 void setCursor(Cursor cursor)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mDataCursor

protected Cursor mDataCursor

mColumnIndex

protected int mColumnIndex

mAlphabet

protected CharSequence mAlphabet
Constructor Detail

AlphabetIndexer

public AlphabetIndexer(Cursor cursor,
                       int sortedColumnIndex,
                       CharSequence alphabet)
Method Detail

getSections

public Object[] getSections()
Specified by:
getSections in interface SectionIndexer

setCursor

public void setCursor(Cursor cursor)

compare

protected int compare(String word,
                      String letter)

getPositionForSection

public int getPositionForSection(int sectionIndex)
Specified by:
getPositionForSection in interface SectionIndexer

getSectionForPosition

public int getSectionForPosition(int position)
Specified by:
getSectionForPosition in interface SectionIndexer

onChanged

public void onChanged()
Overrides:
onChanged in class DataSetObserver

onInvalidated

public void onInvalidated()
Overrides:
onInvalidated in class DataSetObserver


Copyright © 2008-2012. All Rights Reserved.