Interface IHitTestable
Defines the base interface for a type which can be hit-tested
Namespace:
Assembly: .dll
Syntax
public interface IHitTestable
Methods
getBoundsRelativeTo(Rect bounds, IHitTestable hitTestable)
Gets the bounds of the current IHitTestable relative to the other IHitTestable element
Declaration
public abstract boolean getBoundsRelativeTo(Rect bounds, IHitTestable hitTestable)
Parameters
| Type | Name | Description |
|---|---|---|
| android.graphics.Rect | bounds | The Rect instance where result of transformation should be stored |
| hitTestable | The other IHitTestable to use when transforming the point |
Returns
| Type | Description |
|---|---|
| boolean | True if operation was successful |
getBoundsRelativeTo(RectF bounds, IHitTestable hitTestable)
Gets the bounds of the current IHitTestable relative to the other IHitTestable element
Declaration
public abstract boolean getBoundsRelativeTo(RectF bounds, IHitTestable hitTestable)
Parameters
| Type | Name | Description |
|---|---|---|
| android.graphics.RectF | bounds | The RectF instance where result of transformation should be stored |
| hitTestable | The other IHitTestable to use when transforming the point |
Returns
| Type | Description |
|---|---|
| boolean | True if operation was successful |
getView()
Gets the View instance associated with this IHitTestable element
Declaration
public abstract View getView()
Returns
| Type | Description |
|---|---|
| android.view.View | The View instance |
isPointWithinBounds(float x, float y)
Checks if the point is within the bound of the current IHitTestable element
Declaration
public abstract boolean isPointWithinBounds(float x, float y)
Parameters
| Type | Name | Description |
|---|---|---|
| float | x | The x coordinate in pixels |
| float | y | The y coordinate in pixels |
Returns
| Type | Description |
|---|---|
| boolean | True if the point is within bounds |
isPointWithinBounds(float x, float y, IHitTestable hitTestable)
Checks if the point specified relative to another IHitTestable element is within the bound of the current IHitTestable element
Declaration
public abstract boolean isPointWithinBounds(float x, float y, IHitTestable hitTestable)
Parameters
| Type | Name | Description |
|---|---|---|
| float | x | The x coordinate in pixels |
| float | y | The y coordinate in pixels |
| hitTestable | The other IHitTestable to use when checking the point |
Returns
| Type | Description |
|---|---|
| boolean | True if the point is within bounds |
translatePoint(PointF point, IHitTestable hitTestable)
Translates the point relative to the other IHitTestable element
Declaration
public abstract boolean translatePoint(PointF point, IHitTestable hitTestable)
Parameters
| Type | Name | Description |
|---|---|---|
| android.graphics.PointF | point | The point which should be transformed |
| hitTestable | The other IHitTestable to use when transforming the point |
Returns
| Type | Description |
|---|---|
| boolean | True if operation was successful |