Code example for AlphabetIndexer

Methods: setCursor

0
            mDurationIdx = cursor.getColumnIndexOrThrow(MediaStore.Audio.Media.DURATION);
            try { 
                mAudioIdIdx = cursor.getColumnIndexOrThrow(
                        MediaStore.Audio.Playlists.Members.AUDIO_ID);
            } catch (IllegalArgumentException ex) {
                mAudioIdIdx = cursor.getColumnIndexOrThrow(MediaStore.Audio.Media._ID);
            } 
             
            if (mIndexer != null) {
                mIndexer.setCursor(cursor);
            } /*else if (!mActivity.mEditMode && mActivity.mAlbumId == null) { 
                String alpha = mActivity.getString(R.string.fast_scroll_alphabet); 
             
                mIndexer = new MusicAlphabetIndexer(cursor, mTitleIdx, alpha); 
            }*/ 
        } 
    } 
 
    @Override 
    public View newView(Context context, Cursor cursor, ViewGroup parent) {
        View v = super.newView(context, cursor, parent);