summaryrefslogtreecommitdiff
path: root/core/src/main
diff options
context:
space:
mode:
authorBrad Pitcher <bradpitcher@gmail.com>2019-04-18 22:08:49 -0700
committerBrad Pitcher <bradpitcher@gmail.com>2019-04-18 22:08:49 -0700
commita349865af3dcc9e020ee06296f8b20e7dc0d4a2b (patch)
treea3acb38b352d2dcfdbd7ee21c2973883bacf21c3 /core/src/main
parent73c39fc3d0e675949f25fc102c6582dde3db628a (diff)
downloadAntennaPod-a349865af3dcc9e020ee06296f8b20e7dc0d4a2b.zip
use multi-line TextView for "No media playing"
Diffstat (limited to 'core/src/main')
-rw-r--r--core/src/main/java/de/danoeh/antennapod/core/service/PlayerWidgetJobService.java8
-rw-r--r--core/src/main/res/layout/player_widget.xml18
2 files changed, 20 insertions, 6 deletions
diff --git a/core/src/main/java/de/danoeh/antennapod/core/service/PlayerWidgetJobService.java b/core/src/main/java/de/danoeh/antennapod/core/service/PlayerWidgetJobService.java
index 6b2b5038e..0ec4ae038 100644
--- a/core/src/main/java/de/danoeh/antennapod/core/service/PlayerWidgetJobService.java
+++ b/core/src/main/java/de/danoeh/antennapod/core/service/PlayerWidgetJobService.java
@@ -133,6 +133,8 @@ public class PlayerWidgetJobService extends SafeJobIntentService {
}
views.setTextViewText(R.id.txtvTitle, media.getEpisodeTitle());
+ views.setViewVisibility(R.id.txtvTitle, View.VISIBLE);
+ views.setViewVisibility(R.id.txtNoPlaying, View.GONE);
String progressString;
if (playbackService != null) {
@@ -166,10 +168,10 @@ public class PlayerWidgetJobService extends SafeJobIntentService {
// start the app if they click anything
views.setOnClickPendingIntent(R.id.layout_left, startAppPending);
views.setOnClickPendingIntent(R.id.butPlay, startAppPending);
- views.setViewVisibility(R.id.txtvProgress, View.INVISIBLE);
+ views.setViewVisibility(R.id.txtvProgress, View.GONE);
+ views.setViewVisibility(R.id.txtvTitle, View.GONE);
+ views.setViewVisibility(R.id.txtNoPlaying, View.VISIBLE);
views.setImageViewResource(R.id.imgvCover, R.mipmap.ic_launcher_foreground);
- views.setTextViewText(R.id.txtvTitle,
- this.getString(R.string.no_media_playing_label));
views.setImageViewResource(R.id.butPlay, R.drawable.ic_play_arrow_white_24dp);
}
diff --git a/core/src/main/res/layout/player_widget.xml b/core/src/main/res/layout/player_widget.xml
index 5d3365dde..daf661002 100644
--- a/core/src/main/res/layout/player_widget.xml
+++ b/core/src/main/res/layout/player_widget.xml
@@ -46,22 +46,34 @@
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:text="@string/no_media_playing_label"
android:textColor="@color/white"
android:textSize="@dimen/text_size_medium"
- android:textStyle="bold" />
+ 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:textColor="@color/white"
+ android:visibility="gone" />
</LinearLayout>
</LinearLayout>
</RelativeLayout>