Merge "Invalidate TextView on change of elegantTextHeight" into nyc-dev

This commit is contained in:
Raph Levien
2016-03-11 01:26:51 +00:00
committed by Android (Google) Code Review

View File

@@ -3071,7 +3071,14 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
* @attr ref android.R.styleable#TextView_elegantTextHeight
*/
public void setElegantTextHeight(boolean elegant) {
mTextPaint.setElegantTextHeight(elegant);
if (elegant != mTextPaint.isElegantTextHeight()) {
mTextPaint.setElegantTextHeight(elegant);
if (mLayout != null) {
nullLayouts();
requestLayout();
invalidate();
}
}
}
/**