| title | ViewHelper |
|---|---|
| titleTemplate | title - API / NativeScript |
| contributors | false |
Defined in: ui/core/view/view-helper/index.d.ts:3
new ViewHelper(): ViewHelper;ViewHelper
static combineMeasuredStates(curState: number, newState: any): number;Defined in: ui/core/view/view-helper/index.d.ts:33
| Parameter | Type |
|---|---|
curState |
number |
newState |
any |
number
static layoutChild(
parent: View,
child: View,
left: number,
top: number,
right: number,
bottom: number): void;Defined in: ui/core/view/view-helper/index.d.ts:21
Layout a child by taking into account its margins, horizontal and vertical alignments and a given bounds.
| Parameter | Type | Description |
|---|---|---|
parent |
View |
This parameter is not used. You can pass null. |
child |
View |
- |
left |
number |
Left position, relative to parent |
top |
number |
Top position, relative to parent |
right |
number |
Right position, relative to parent |
bottom |
number |
Bottom position, relative to parent |
void
static measureChild(
parent: View,
child: View,
widthMeasureSpec: number,
heightMeasureSpec: number): {
measuredHeight: number;
measuredWidth: number;
};Defined in: ui/core/view/view-helper/index.d.ts:11
Measure a child by taking into account its margins and a given measureSpecs.
| Parameter | Type | Description |
|---|---|---|
parent |
View |
This parameter is not used. You can pass null. |
child |
View |
The view to be measured. |
widthMeasureSpec |
number |
- |
heightMeasureSpec |
number |
- |
{
measuredHeight: number;
measuredWidth: number;
}measuredHeight: number;measuredWidth: number;static resolveSizeAndState(
size: number,
specSize: number,
specMode: number,
childMeasuredState: number): number;Defined in: ui/core/view/view-helper/index.d.ts:31
Utility to reconcile a desired size and state, with constraints imposed by a MeasureSpec. Will take the desired size, unless a different size is imposed by the constraints. The returned value is a compound integer, with the resolved size in the MEASURED_SIZE_MASK bits and optionally the bit MEASURED_STATE_TOO_SMALL set if the resulting size is smaller than the size the view wants to be.
| Parameter | Type |
|---|---|
size |
number |
specSize |
number |
specMode |
number |
childMeasuredState |
number |
number