Add a default album art icon for the library controls

Mostly to prevent the need to shift the postion of the buttons back and forth
when changing between songs with/without cover art.
This commit is contained in:
Christopher Eby 2011-09-23 02:23:24 -05:00
parent 98873972f7
commit 5620d240b5
3 changed files with 7 additions and 7 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@ -34,17 +34,13 @@ THE SOFTWARE.
android:layout_height="80dip">
<ImageView
android:id="@+id/cover"
android:adjustViewBounds="true"
android:padding="2dip"
android:scaleType="fitCenter"
android:maxWidth="80dip"
android:layout_width="wrap_content"
android:layout_width="80dip"
android:layout_height="fill_parent"
android:layout_gravity="center" />
<TextView
android:id="@+id/status_text"
android:paddingLeft="3dip"
android:paddingRight="3dip"
android:text="@string/none"
android:textSize="16sp"
android:singleLine="true"

View File

@ -801,8 +801,12 @@ public class LibraryActivity extends PlaybackActivity implements AdapterView.OnI
cover = song.getCover(this);
}
mCover.setImageBitmap(cover);
mCover.setVisibility(cover == null ? View.GONE : View.VISIBLE);
if (Song.mDisableCoverArt)
mCover.setVisibility(View.GONE);
else if (cover == null)
mCover.setImageResource(R.drawable.albumart_mp_unknown_list);
else
mCover.setImageBitmap(cover);
}
}