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:
parent
5fb04114a8
commit
667583f95f
@ -87,6 +87,12 @@ public class AutoResizeTextView extends TextView {
|
|||||||
mNeedsResize = true;
|
mNeedsResize = true;
|
||||||
// Since this view may be reused, it is good to reset the text size
|
// Since this view may be reused, it is good to reset the text size
|
||||||
resetTextSize();
|
resetTextSize();
|
||||||
|
|
||||||
|
final int height = getHeight();
|
||||||
|
final int width = getWidth();
|
||||||
|
if (height > 0 && width > 0) {
|
||||||
|
resizeText();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user