Merge "Fix BigText transitions" into nyc-dev
am: 2ab4f451dc
* commit '2ab4f451dc79c18089fa0bdbba7cdccf5c3c9d47':
Fix BigText transitions
Change-Id: I4705bacc68842c2a7ed178689e8efa53abc8e235
This commit is contained in:
@@ -47,12 +47,16 @@ public class TextViewTransformState extends TransformState {
|
|||||||
int ownEllipsized = getEllipsisCount();
|
int ownEllipsized = getEllipsisCount();
|
||||||
int otherEllipsized = otherTvs.getEllipsisCount();
|
int otherEllipsized = otherTvs.getEllipsisCount();
|
||||||
return ownEllipsized == otherEllipsized
|
return ownEllipsized == otherEllipsized
|
||||||
&& mText.getHeight() == otherTvs.mText.getHeight();
|
&& getInnerHeight(mText) == getInnerHeight(otherTvs.mText);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return super.sameAs(otherState);
|
return super.sameAs(otherState);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private int getInnerHeight(TextView text) {
|
||||||
|
return text.getHeight() - text.getPaddingTop() - text.getPaddingBottom();
|
||||||
|
}
|
||||||
|
|
||||||
private int getEllipsisCount() {
|
private int getEllipsisCount() {
|
||||||
Layout l = mText.getLayout();
|
Layout l = mText.getLayout();
|
||||||
if (l != null) {
|
if (l != null) {
|
||||||
|
|||||||
Reference in New Issue
Block a user