Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7c8d2d78 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Do not ignore views that are GONE" into sc-dev am: 4d2b82b0

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14521253

Change-Id: I48538d4fc13555c6bd1a3217769f64140f587146
parents fece923d 4d2b82b0
Loading
Loading
Loading
Loading
+9 −7
Original line number Original line Diff line number Diff line
@@ -45,6 +45,7 @@ class IgnorableChildLinearLayout @JvmOverloads constructor(
        super.onMeasure(widthMeasureSpec, heightMeasureSpec)
        super.onMeasure(widthMeasureSpec, heightMeasureSpec)
        if (ignoreLastView && childCount > 0) {
        if (ignoreLastView && childCount > 0) {
            val lastView = getChildAt(childCount - 1)
            val lastView = getChildAt(childCount - 1)
            if (lastView.visibility != GONE) {
                val lp = lastView.layoutParams as MarginLayoutParams
                val lp = lastView.layoutParams as MarginLayoutParams
                if (orientation == VERTICAL) {
                if (orientation == VERTICAL) {
                    val height = lastView.measuredHeight + lp.bottomMargin + lp.topMargin
                    val height = lastView.measuredHeight + lp.bottomMargin + lp.topMargin
@@ -56,3 +57,4 @@ class IgnorableChildLinearLayout @JvmOverloads constructor(
            }
            }
        }
        }
    }
    }
}
 No newline at end of file