Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 73: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 74: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 75: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 76: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 77: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 78: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
package ch.egsolutions.alpha; import android.app.Activity; import android.content.Context; import android.database.Cursor; import android.os.Bundle; import android.widget.AlphabetIndexer; import android.widget.ListView; import android.widget.SectionIndexer; import android.widget.SimpleCursorAdapter; public class AlphabetIndexerActivity extends Activity { /** Called when the activity is first created. */ ListView myListView; Cursor myCursor; String[] proj; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); DbUtil dbUtil=new DbUtil(getApplicationContext()); dbUtil.open(); dbUtil.insertRandomNames(); myCursor=dbUtil.fetchAllData(); //getting my ordered cursor myListView=(ListView)findViewById(R.id.myListView); myListView.setFastScrollEnabled(true); //must be enabled myListView.setAdapter( new MyCursorAdapter( getApplicationContext(), android.R.layout.simple_list_item_1, myCursor, new String[]{DbUtil.KEY_NAME},//from new int[]{android.R.id.text1}) //to ); dbUtil.close(); } class MyCursorAdapter extends SimpleCursorAdapter implements SectionIndexer{ AlphabetIndexer alphaIndexer; public MyCursorAdapter(Context context, int layout, Cursor c, String[] from, int[] to) { super(context, layout, c, from, to); alphaIndexer=new AlphabetIndexer(c, myCursor.getColumnIndex(DbUtil.KEY_NAME), " ABCDEFGHIJKLMNOPQRSTUVWXYZ"); // you have just to instanciate the indexer class like this //cursor,index of the sorted colum,a string representing the alphabeth (pay attention on the blank char at the beginning of the sequence) } @Override public int getPositionForSection(int section) { return alphaIndexer.getPositionForSection(section); //use the indexer } @Override public int getSectionForPosition(int position) { return alphaIndexer.getSectionForPosition(position); //use the indexer } @Override public Object[] getSections() { return alphaIndexer.getSections(); //use the indexer } } }