Code example for Adapter

Methods: getItem

0
        public ImageLoader() { 
            mCache = ArtistImageCache.getInstance(getActivity());
        } 
 
        public String getItemParams(Adapter adapter, int position) {
            Cursor cursor = (Cursor) adapter.getItem(position);
            if (cursor.moveToPosition(position)) {
                return cursor.getString(cursor.getColumnIndex(MediaStore.Audio.Artists.ARTIST));
            } 
            return null; 
        } 
 
        @Override 
        public CacheableBitmapDrawable loadItem(String artist) {
            if (artist == null) return null;
            return mCache.getImageBlocking(artist);
        } 
 
        @Override 
        public CacheableBitmapDrawable loadItemFromMemory(String artist) {
            if (artist == null) return null;