View might not be relayouted after the text change, try to resize text if we have measured height and width

This commit is contained in:
serso 2016-02-06 23:56:15 +01:00
parent 5fb04114a8
commit 667583f95f

View File

@ -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();
}
}
/**