Not sure how many people here are familiar with the Android Universal Music Player but I am having issue with displaying an album in the MediaItemViewHolder.java file.
So here is a basic structure after my modifications:
// image view for the album cover
holder.mImageView = (ImageView) convertView.findViewById(R.id.play_eq);
// get the album art url
String artUrl = description.getIconUri().toString();
Bitmap art;
AlbumArtCache cache = AlbumArtCache.getInstance();
art = cache.getIconImage(artUrl);
....
if (cachedState == null || cachedState != state) {
switch (state) {
case STATE_PLAYABLE:
// display the album cover
holder.mImageView.setImageBitmap(art);
break;
....
This correctly displays the album cover. However, it is initially blank. Once the user clicks on an item, the image is displayed.
Screenshot #1 : Once the app is loaded and user did not click on any item:
Screenshot #2 : Once the user click on the item to play the song
I am not really sure what is causing the album to be initially blank. Looking at the AlbumArtCache.java I can't see any restrictions about OnClickListener that can cause this.
Any suggestions how to resolve this issue?