summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorByteHamster <ByteHamster@users.noreply.github.com>2024-05-10 08:11:28 +0200
committerGitHub <noreply@github.com>2024-05-10 08:11:28 +0200
commit8d3eb6aae92e0b350b42b35f0ce716925dd24569 (patch)
tree400436ab9ff21244665b9f5631adba9ae085794d
parent084723ad76f93822b9a15b24bb55a1fefa155dce (diff)
downloadAntennaPod-8d3eb6aae92e0b350b42b35f0ce716925dd24569.zip
NoRelayoutTextView: Enable requestLayout in more cases (#7175)
-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) {