diff options
author | H. Lehmann <ByteHamster@users.noreply.github.com> | 2019-05-28 16:29:43 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-28 16:29:43 +0200 |
commit | 8380c1854333c86d8677ad0197e42762b80d6c18 (patch) | |
tree | 7f1014ba44fc1624554a46071761469e4f1a755b /core/src/main/res | |
parent | d81cb2ff398229024f71ca719ba2fbb708899fcb (diff) | |
parent | 88854ea6ba68354e55686f6ad98e09384e6acab3 (diff) | |
download | AntennaPod-8380c1854333c86d8677ad0197e42762b80d6c18.zip |
Merge pull request #2709 from brad/fix-2359
Display cover art for media in the widget
Diffstat (limited to 'core/src/main/res')
-rw-r--r-- | core/src/main/res/drawable-hdpi/ic_widget_preview.png | bin | 8210 -> 19686 bytes | |||
-rw-r--r-- | core/src/main/res/layout/player_widget.xml | 71 |
2 files changed, 50 insertions, 21 deletions
diff --git a/core/src/main/res/drawable-hdpi/ic_widget_preview.png b/core/src/main/res/drawable-hdpi/ic_widget_preview.png Binary files differindex 85a537154..3c1e08a31 100644 --- a/core/src/main/res/drawable-hdpi/ic_widget_preview.png +++ b/core/src/main/res/drawable-hdpi/ic_widget_preview.png diff --git a/core/src/main/res/layout/player_widget.xml b/core/src/main/res/layout/player_widget.xml index 4c98895a0..daf661002 100644 --- a/core/src/main/res/layout/player_widget.xml +++ b/core/src/main/res/layout/player_widget.xml @@ -12,7 +12,7 @@ <ImageButton android:id="@+id/butPlay" android:contentDescription="@string/play_label" - android:layout_width="56dp" + android:layout_width="@android:dimen/app_icon_size" android:layout_height="match_parent" android:layout_alignParentRight="true" android:layout_margin="12dp" @@ -26,26 +26,55 @@ android:layout_alignParentLeft="true" android:layout_toLeftOf="@id/butPlay" android:background="@drawable/borderless_button_dark" - android:gravity="center_vertical" - android:orientation="vertical" > - - <TextView - android:id="@+id/txtvTitle" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_margin="8dp" - android:maxLines="1" - android:text="@string/no_media_playing_label" - android:textColor="@color/white" - android:textSize="@dimen/text_size_medium" - android:textStyle="bold" /> - - <TextView - android:id="@+id/txtvProgress" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_margin="8dp" - android:textColor="@color/white" /> + android:gravity="fill_horizontal" + android:orientation="horizontal" > + + <ImageView + android:id="@+id/imgvCover" + android:layout_width="@android:dimen/app_icon_size" + android:layout_height="match_parent" + android:layout_alignParentLeft="true" + android:layout_margin="12dp" + android:layout_toLeftOf="@id/layout_center" /> + + <LinearLayout + android:id="@+id/layout_center" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:layout_alignParentRight="true" + android:gravity="center_vertical" + android:orientation="vertical" > + + <TextView + android:id="@+id/txtNoPlaying" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginVertical="12dp" + android:maxLines="3" + android:text="@string/no_media_playing_label" + android:textColor="@color/white" + android:textSize="@dimen/text_size_medium" + android:textStyle="bold" /> + + <TextView + android:id="@+id/txtvTitle" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginVertical="8dp" + android:maxLines="1" + android:textColor="@color/white" + android:textSize="@dimen/text_size_medium" + android:textStyle="bold" + android:visibility="gone" /> + + <TextView + android:id="@+id/txtvProgress" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginVertical="8dp" + android:textColor="@color/white" + android:visibility="gone" /> + </LinearLayout> </LinearLayout> </RelativeLayout> |