summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/src/main/java/de/danoeh/antennapod/ui/screen/playback/audio/NoRelayoutTextView.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/ui/screen/playback/audio/NoRelayoutTextView.java b/app/src/main/java/de/danoeh/antennapod/ui/screen/playback/audio/NoRelayoutTextView.java
index 86f9a53e9..98018bfa0 100644
--- a/app/src/main/java/de/danoeh/antennapod/ui/screen/playback/audio/NoRelayoutTextView.java
+++ b/app/src/main/java/de/danoeh/antennapod/ui/screen/playback/audio/NoRelayoutTextView.java
@@ -1,13 +1,14 @@
package de.danoeh.antennapod.ui.screen.playback.audio;
import android.content.Context;
+import android.os.Parcelable;
import android.util.AttributeSet;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.widget.AppCompatTextView;
public class NoRelayoutTextView extends AppCompatTextView {
- private boolean requestLayoutEnabled = false;
+ private boolean requestLayoutEnabled = true;
private float maxTextLength = 0;
public NoRelayoutTextView(@NonNull Context context) {
@@ -31,6 +32,12 @@ public class NoRelayoutTextView extends AppCompatTextView {
}
@Override
+ public void onRestoreInstanceState(Parcelable state) {
+ requestLayoutEnabled = true;
+ super.onRestoreInstanceState(state);
+ }
+
+ @Override
public void setText(CharSequence text, BufferType type) {
float textLength = getPaint().measureText(text.toString());
if (textLength > maxTextLength) {