Skip to content

Commit

Permalink
Fix Text is not completely shown in Expanded State
Browse files Browse the repository at this point in the history
  • Loading branch information
dimskiy authored Apr 13, 2022
1 parent b3b8148 commit f61f411
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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
Expand Down Expand Up @@ -457,4 +457,4 @@ public void setView(View toggleView) {
mTextView = (TextView) toggleView;
}
}
}
}

0 comments on commit f61f411

Please sign in to comment.