From 667583f95f1c7c676827bfb639181d32c476a049 Mon Sep 17 00:00:00 2001 From: serso Date: Sat, 6 Feb 2016 23:56:15 +0100 Subject: [PATCH] View might not be relayouted after the text change, try to resize text if we have measured height and width --- .../java/org/solovyev/android/views/AutoResizeTextView.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/src/main/java/org/solovyev/android/views/AutoResizeTextView.java b/app/src/main/java/org/solovyev/android/views/AutoResizeTextView.java index f353bc6c..14844f11 100644 --- a/app/src/main/java/org/solovyev/android/views/AutoResizeTextView.java +++ b/app/src/main/java/org/solovyev/android/views/AutoResizeTextView.java @@ -87,6 +87,12 @@ public class AutoResizeTextView extends TextView { mNeedsResize = true; // Since this view may be reused, it is good to reset the text size resetTextSize(); + + final int height = getHeight(); + final int width = getWidth(); + if (height > 0 && width > 0) { + resizeText(); + } } /**