Merge "Fix BigText transitions" into nyc-dev am: 2ab4f451dc

am: 50844bc504

* commit '50844bc50429e6e6f4f0d33b177491c25f47e6ce':
  Fix BigText transitions

Change-Id: I822241014f796954ee80e5d3ad2ba747f2ef1f03
This commit is contained in:
Adrian Roos
2016-06-03 16:13:46 +00:00
committed by android-build-merger

View File

@@ -47,12 +47,16 @@ public class TextViewTransformState extends TransformState {
int ownEllipsized = getEllipsisCount();
int otherEllipsized = otherTvs.getEllipsisCount();
return ownEllipsized == otherEllipsized
&& mText.getHeight() == otherTvs.mText.getHeight();
&& getInnerHeight(mText) == getInnerHeight(otherTvs.mText);
}
}
return super.sameAs(otherState);
}
private int getInnerHeight(TextView text) {
return text.getHeight() - text.getPaddingTop() - text.getPaddingBottom();
}
private int getEllipsisCount() {
Layout l = mText.getLayout();
if (l != null) {