rockbox/android/res/layout/statusbar.xml
Dominik Riebeling ed15d53919 Android: show Album Art in notification area.
Instead of showing the small Rockbox clef logo show the Album Art if available.
If no Album Art is available show the clef logo about the same size as the
Album Art.

- The notification area process doesn't have permissions to access the SD card.
  Therefore the image needs to be read and set as Bitmap instead of simply
  setting the Uri to it as done in the widget.
- Passing a full sized image to the Notification Manager can cause issues
  (Rockbox UI hanging, notification not updating anymore, force closes). Scale
  down the image to the same size the launcher icon has to avoid this. This
  also makes the logo shown when no Album Art is available have the same size
  which looks nicer than having different sizes. Album Art images are allowed
  to be wider since there is enough room.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30629 a1c6a512-1295-4272-9138-f99709370657
2011-10-01 20:07:57 +00:00

54 lines
1.9 KiB
XML

<?xml version="1.0" encoding="ISO-8859-1"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:paddingLeft="6dp"
android:paddingRight="6dp"
android:paddingTop="0dp"
android:paddingBottom="0dp"
android:orientation="horizontal">
<ImageView android:id="@+id/artwork"
android:gravity="center"
android:padding="2dp"
android:scaleType="center"
android:adjustViewBounds="false"
android:layout_width="wrap_content"
android:layout_height="fill_parent">
</ImageView>
<LinearLayout android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:focusable="true"
android:ellipsize="end"
android:textStyle="bold"
android:singleLine="true"
android:textAppearance="?android:attr/textAppearanceMediumInverse"
android:gravity="center"
android:paddingTop="0dp"
android:paddingLeft="6dp" />
</LinearLayout>
<LinearLayout android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="3dp"
android:orientation="horizontal">
<TextView android:id="@+id/content"
android:layout_gravity="left"
android:scrollHorizontally="true"
android:maxLines="2"
android:ellipsize="end"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceSmallInverse"
/>
</LinearLayout>
</LinearLayout>
</LinearLayout>