public final class ViewUtil
extends java.lang.Object
View
instances.Constructor and Description |
---|
ViewUtil() |
Modifier and Type | Method and Description |
---|---|
static boolean |
getBoundsRelativeTo(android.view.View view,
IHitTestable relativeTo,
android.graphics.Rect bounds)
Gets the bounds of the
View relative to other IHitTestable element. |
static boolean |
getBoundsRelativeTo(android.view.View view,
IHitTestable relativeTo,
android.graphics.RectF bounds)
Gets the bounds of the
View relative to other IHitTestable element. |
static boolean |
getBoundsRelativeTo(android.view.View view,
android.view.View relativeTo,
android.graphics.Rect bounds)
Gets the bounds of the
View relative to other View element. |
static boolean |
getBoundsRelativeTo(android.view.View view,
android.view.View relativeTo,
android.graphics.RectF bounds)
Gets the bounds of the
View relative to other View element. |
static boolean |
isPointWithinBounds(android.view.View view,
float x,
float y)
Returns true if the point is within the bounds of the
View . |
static boolean |
isPointWithinBounds(android.view.View viewToCheck,
float x,
float y,
IHitTestable relativeTo)
Returns true if the point specified relative to other
IHitTestable element is within the bounds of the View . |
static boolean |
isPointWithinBounds(android.view.View viewToCheck,
float x,
float y,
android.view.View relativeTo)
Returns true if the point specified relative to other
View element is within the bounds of the View . |
static boolean |
translatePoint(android.view.View view,
android.graphics.PointF point,
IHitTestable relativeTo)
Translates points relative to other
IHitTestable element. |
static boolean |
translatePoint(android.view.View view,
android.graphics.PointF point,
android.view.View relativeTo)
Translates points relative to other
View element. |
public static boolean translatePoint(android.view.View view, android.graphics.PointF point, IHitTestable relativeTo)
IHitTestable
element.view
- The View
instance.point
- The point which should be transformed.relativeTo
- The other IHitTestable
instance to use when transforming the point.public static boolean translatePoint(android.view.View view, android.graphics.PointF point, android.view.View relativeTo)
View
element.view
- The View
instance.point
- The point which should be transformed.relativeTo
- The other View
instance to use when transforming the point.public static boolean isPointWithinBounds(android.view.View view, float x, float y)
View
.view
- The View
instance, which bound will be used to check.x
- The x coordinate of the point to check.y
- The y coordinate of the point to check.public static boolean isPointWithinBounds(android.view.View viewToCheck, float x, float y, IHitTestable relativeTo)
IHitTestable
element is within the bounds of the View
.viewToCheck
- The View
instance, which bound will be used to check.x
- The x coordinate of the point to check.y
- The y coordinate of the point to check.relativeTo
- The other IHitTestable
instance to which the viewToCheck is related.public static boolean isPointWithinBounds(android.view.View viewToCheck, float x, float y, android.view.View relativeTo)
View
element is within the bounds of the View
.viewToCheck
- The View
instance, which bound will be used to check.x
- The x coordinate of the point to check.y
- The y coordinate of the point to check.relativeTo
- The other View
instance to which the viewToCheck is related.public static boolean getBoundsRelativeTo(android.view.View view, IHitTestable relativeTo, android.graphics.Rect bounds)
View
relative to other IHitTestable
element.view
- The View
instance.relativeTo
- The other IHitTestable
instance to which the view is related.bounds
- The bounds of the View
relative to other IHitTestable
element, which is calculated in this method.public static boolean getBoundsRelativeTo(android.view.View view, android.view.View relativeTo, android.graphics.Rect bounds)
View
relative to other View
element.view
- The View
instance.relativeTo
- The other View
instance to which the view is related.bounds
- The bounds of the View
relative to other IHitTestable
element, which is calculated in this method.public static boolean getBoundsRelativeTo(android.view.View view, IHitTestable relativeTo, android.graphics.RectF bounds)
View
relative to other IHitTestable
element.view
- The View
instance.relativeTo
- The other IHitTestable
instance to which the view is related.bounds
- The bounds of the View
relative to other IHitTestable
element, which is calculated in this method.public static boolean getBoundsRelativeTo(android.view.View view, android.view.View relativeTo, android.graphics.RectF bounds)
View
relative to other View
element.view
- The View
instance.relativeTo
- The other View
instance to which the view is related.bounds
- The bounds of the View
relative to other IHitTestable
element, which is calculated in this method.