Package 

Class RectFUtils

    • Method Summary

      Modifier and Type Method Description
      static boolean areIdentical(RectF r1, RectF r2) Determine if two RectF instances are equal.
      static RectF applyInsets(RectF rect, Insets insets) Calculates a new RectF by applying insets to rect.
      static RectF createFromEdges(float w1, float h1, float w2, float h2) Generates a RectF from two height and two width values; the h and w values willbe passed into the RectF constructor such that RectF.left <= RectF.right andRectF.top <= RectF.bottom.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • areIdentical

         static boolean areIdentical(RectF r1, RectF r2)

        Determine if two RectF instances are equal. Must be used in placeof default equality operation due to a bug that exists in older versions of Android:http://stackoverflow.com/questions/13517852/rectf-equals-fails-on-android-versions-below-jelly-bean

        Parameters:
        r1 - May not be null
        r2 - May not be null
      • createFromEdges

         static RectF createFromEdges(float w1, float h1, float w2, float h2)

        Generates a RectF from two height and two width values; the h and w values willbe passed into the RectF constructor such that RectF.left <= RectF.right andRectF.top <= RectF.bottom.

        Parameters:
        w1 - width1
        h1 - height1
        w2 - width2
        h2 - height2