Code example for AlphabetIndexer

Methods: setCursor

0
            } 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);
         
        ViewHolder vh = new ViewHolder();
        vh.line1 = (TextView) v.findViewById(R.id.line1_title);
        vh.line2 = (TextView) v.findViewById(R.id.line2_info);