public class DoubleMeasureFixUtil extends java.lang.Object
|Constructor and Description|
|Modifier and Type||Method and Description|
Correction for an Android bug on some devices with "special" densities where the system will double-measure with slightly different widths in the same traversal.
public static int correctWidthSpecForAndroidDoubleMeasureBug(Resources resources, PackageManager packageManager, int widthSpec)
This hits Litho extra-hard because we create
LayoutStates in measure in many places,
so we try to correct for it here by replacing the widthSpec given to us from above with what we
think the correct one is. Even though the double measure will still happen, the incorrect width
will not propagate to any vertical RecyclerViews contained within.