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:
parent
98873972f7
commit
5620d240b5
BIN
res/drawable/albumart_mp_unknown_list.png
Normal file
BIN
res/drawable/albumart_mp_unknown_list.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.6 KiB |
@ -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"
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user