MeasureComparisonUtils

An utility class to verify that an old measured size is still compatible to be used with a new measureSpec.

Functions

Link copied to clipboard
Link copied to clipboard
fun hasCompatibleSizeSpec(    oldWidthSpec: Int,     oldHeightSpec: Int,     newWidthSpec: Int,     newHeightSpec: Int,     oldMeasuredWidth: Int,     oldMeasuredHeight: Int): Boolean

Check if a cached nested tree has compatible SizeSpec to be reused as is or if it needs to be recomputed.

Link copied to clipboard
fun isMeasureSpecCompatible(oldSizeSpec: Int, sizeSpec: Int, oldMeasuredSize: Int): Boolean