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 3028207..ab0c468 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,15 +207,10 @@ protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { super.onMeasure(widthMeasureSpec, heightMeasureSpec); if (mCollapsed) { - // Gets the margin between the TextView's bottom and the ViewGroup's bottom - mTv.post(new Runnable() { - @Override - public void run() { - mMarginBetweenTxtAndBottom = getHeight() - mTv.getHeight(); - } - }); // Saves the collapsed height of this ViewGroup mCollapsedHeight = getMeasuredHeight(); + // Gets the margin between the TextView's bottom and the ViewGroup's bottom + mMarginBetweenTxtAndBottom = mCollapsedHeight - mTv.getMeasuredHeight(); } }