Merge "Fix BigText transitions" into nyc-dev am: 2ab4f451dc am: 50844bc504
am: 3c8c89db25
* commit '3c8c89db25a8296b9bae450c4bfc1a31c25ebf08':
Fix BigText transitions
Change-Id: I64d22508c458db3b8b10359d4ac280986693f4b5
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user