diff --git a/lib/src/main/java/com/ms/square/android/expandabletextview/ExpandableTextView.java b/lib/src/main/java/com/ms/square/android/expandabletextview/ExpandableTextView.java index fb1b867..6c450fc 100644 --- a/lib/src/main/java/com/ms/square/android/expandabletextview/ExpandableTextView.java +++ b/lib/src/main/java/com/ms/square/android/expandabletextview/ExpandableTextView.java @@ -207,9 +207,6 @@ protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { return; } - // Saves the text height w/ max lines - mTextHeightWithMaxLines = getRealTextViewHeight(mTv); - // Doesn't fit in collapsed mode. Collapse text view as needed. Show // button. if (mCollapsed) { @@ -219,6 +216,9 @@ protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { // Re-measure with new setup super.onMeasure(widthMeasureSpec, heightMeasureSpec); + + // Saves the text height w/ max lines + mTextHeightWithMaxLines = getRealTextViewHeight(mTv); if (mCollapsed) { // Gets the margin between the TextView's bottom and the ViewGroup's bottom @@ -457,4 +457,4 @@ public void setView(View toggleView) { mTextView = (TextView) toggleView; } } -} \ No newline at end of file +}