NativeScript 9.1 Released → V8 14.9, Vite 8 HMR, built for rapid agentic visual iteration
Dig in

Defined in: ui/core/view/index.d.ts:54

This class is the base class for all UI components. A View occupies a rectangular area on the screen and is responsible for drawing and layouting of all UI components within.

Ns View ​

View

Extends ​

  • ViewCommon

Extended by ​

Constructors ​

Constructor ​

ts
new View(): View;

Defined in: ui/core/view-base/index.ts

Returns ​

View

Inherited from ​

ts
ViewCommon.constructor

Properties ​

_androidContentDescriptionUpdated? ​

ts
optional _androidContentDescriptionUpdated?: boolean;

Defined in: ui/core/view/index.d.ts:358

Internal use only. This is used to limit the number of updates to android.view.View.setContentDescription()

Overrides ​

ts
ViewCommon._androidContentDescriptionUpdated

_automaticallyAdjustsScrollViewInsets ​

ts
_automaticallyAdjustsScrollViewInsets: boolean;

Defined in: ui/core/view-base/index.ts

Inherited from ​

ts
ViewCommon._automaticallyAdjustsScrollViewInsets

_closeModalCallback ​

ts
protected _closeModalCallback: Function;

Defined in: ui/core/view/view-common.ts

Inherited from ​

ts
ViewCommon._closeModalCallback

_context ​

ts
_context: any;

Defined in: ui/core/view-base/index.ts

Inherited from ​

ts
ViewCommon._context

_cssState ​

ts
_cssState: CssState;

Defined in: ui/core/view-base/index.ts

Inherited from ​

ts
ViewCommon._cssState

_defaultPaddingBottom ​

ts
protected _defaultPaddingBottom: number;

Defined in: ui/core/view-base/index.ts

Inherited from ​

ts
ViewCommon._defaultPaddingBottom

_defaultPaddingLeft ​

ts
protected _defaultPaddingLeft: number;

Defined in: ui/core/view-base/index.ts

Inherited from ​

ts
ViewCommon._defaultPaddingLeft

_defaultPaddingRight ​

ts
protected _defaultPaddingRight: number;

Defined in: ui/core/view-base/index.ts

Inherited from ​

ts
ViewCommon._defaultPaddingRight

_defaultPaddingTop ​

ts
protected _defaultPaddingTop: number;

Defined in: ui/core/view-base/index.ts

Inherited from ​

ts
ViewCommon._defaultPaddingTop

_domId ​

ts
_domId: number;

Defined in: ui/core/view-base/index.ts

Inherited from ​

ts
ViewCommon._domId

_ignoreFlexMinWidthHeightReset ​

ts
_ignoreFlexMinWidthHeightReset: boolean;

Defined in: ui/core/view-base/index.ts

Inherited from ​

ts
ViewCommon._ignoreFlexMinWidthHeightReset

_isAddedToNativeVisualTree ​

ts
_isAddedToNativeVisualTree: boolean;

Defined in: ui/core/view-base/index.ts

Inherited from ​

ts
ViewCommon._isAddedToNativeVisualTree

_isPaddingRelative ​

ts
protected _isPaddingRelative: boolean;

Defined in: ui/core/view-base/index.ts

Inherited from ​

ts
ViewCommon._isPaddingRelative

_isStyleScopeHost ​

ts
_isStyleScopeHost: boolean;

Defined in: ui/core/view-base/index.ts

Inherited from ​

ts
ViewCommon._isStyleScopeHost

_nativeWindow? ​

ts
optional _nativeWindow?: NativeWindow;

Defined in: ui/core/view/index.d.ts:970

Internal property: The window this view is the root view of. Only ever set on a window's root view; use getNativeWindow() to resolve the window of any other view.

Overrides ​

ts
ViewCommon._nativeWindow

_oldBottom ​

ts
_oldBottom: number;

Defined in: ui/core/view-base/index.ts

Inherited from ​

ts
ViewCommon._oldBottom

_oldLeft ​

ts
_oldLeft: number;

Defined in: ui/core/view-base/index.ts

Inherited from ​

ts
ViewCommon._oldLeft

_oldRight ​

ts
_oldRight: number;

Defined in: ui/core/view-base/index.ts

Inherited from ​

ts
ViewCommon._oldRight

_oldTop ​

ts
_oldTop: number;

Defined in: ui/core/view-base/index.ts

Inherited from ​

ts
ViewCommon._oldTop

_styleScope ​

ts
_styleScope: StyleScope;

Defined in: ui/core/view-base/index.ts

Inherited from ​

ts
ViewCommon._styleScope

_suspendNativeUpdatesCount ​

ts
_suspendNativeUpdatesCount: number;

Defined in: ui/core/view-base/index.ts

Determines the depth of suspended updates. When the value is 0 the current property updates are not batched nor scoped and must be immediately applied. If the value is 1 or greater, the current updates are batched and does not have to provide immediate update. Do not set this field, the _batchUpdate method is responsible to keep the count up to date, as well as adding/rmoving the view to/from the visual tree.

Inherited from ​

ts
ViewCommon._suspendNativeUpdatesCount

accessibilityHidden ​

ts
accessibilityHidden: boolean;

Defined in: ui/core/view/index.d.ts:260

Hide the view and its children from the a11y service

Ns Property ​

Overrides ​

ts
ViewCommon.accessibilityHidden

accessibilityHint ​

ts
accessibilityHint: string;

Defined in: ui/core/view/index.d.ts:305

A hint describes the elements behavior. Example: 'Tap change playback speed'

Ns Property ​

Overrides ​

ts
ViewCommon.accessibilityHint

accessibilityIdentifier ​

ts
accessibilityIdentifier: string;

Defined in: ui/core/view/index.d.ts:269

The view's unique accessibilityIdentifier.

This is used for automated testing.

Ns Property ​

Overrides ​

ts
ViewCommon.accessibilityIdentifier

accessibilityIgnoresInvertColors ​

ts
accessibilityIgnoresInvertColors: boolean;

Defined in: ui/core/view/index.d.ts:332

Ns Property ​

Overrides ​

ts
ViewCommon.accessibilityIgnoresInvertColors

accessibilityLabel ​

ts
accessibilityLabel: string;

Defined in: ui/core/view/index.d.ts:291

Short description of the element, ideally one word.

Ns Property ​

Overrides ​

ts
ViewCommon.accessibilityLabel

accessibilityLanguage ​

ts
accessibilityLanguage: string;

Defined in: ui/core/view/index.d.ts:320

Sets the language in which to speak the element's label and value. Accepts language ID tags that follows the "BCP 47" specification.

Ns Property ​

Overrides ​

ts
ViewCommon.accessibilityLanguage

accessibilityLiveRegion ​

ts
accessibilityLiveRegion: AccessibilityLiveRegion;

Defined in: ui/core/view/index.d.ts:312

When components dynamically change, we want TalkBack to alert the end user. This is made possible by the accessibilityLiveRegion property.

Ns Property ​

Overrides ​

ts
ViewCommon.accessibilityLiveRegion

accessibilityMediaSession ​

ts
accessibilityMediaSession: boolean;

Defined in: ui/core/view/index.d.ts:327

This view starts a media session. Equivalent to trait = startsMedia

Ns Property ​

Overrides ​

ts
ViewCommon.accessibilityMediaSession

accessibilityRole ​

ts
accessibilityRole: AccessibilityRole;

Defined in: ui/core/view/index.d.ts:276

Which role should this view be treated by the a11y service?

Ns Property ​

Overrides ​

ts
ViewCommon.accessibilityRole

accessibilityState ​

ts
accessibilityState: AccessibilityState;

Defined in: ui/core/view/index.d.ts:284

Which state should this view be treated as by the a11y service?

Ns Property ​

Overrides ​

ts
ViewCommon.accessibilityState

accessibilityValue ​

ts
accessibilityValue: string;

Defined in: ui/core/view/index.d.ts:298

Current value of the element in a localized string.

Ns Property ​

Overrides ​

ts
ViewCommon.accessibilityValue

accessible ​

ts
accessible: boolean;

Defined in: ui/core/view/index.d.ts:253

If true the element is an accessibility element and all the children will be treated as a single selectable component.

Ns Property ​

Overrides ​

ts
ViewCommon.accessible

alignSelf ​

ts
alignSelf: AlignSelf;

Defined in: ui/core/view-base/index.ts

(Android-only) Overrides the alignItems value for the child.

Ns Property ​

Inherited from ​

ts
ViewCommon.alignSelf

android ​

ts
android: any;

Defined in: ui/core/view/index.d.ts:121

Gets the android-specific native instance that lies behind this proxy. Will be available if running on an Android platform.

Overrides ​

ts
ViewCommon.android

androidDynamicElevationOffset ​

ts
androidDynamicElevationOffset: number;

Defined in: ui/core/view/index.d.ts:378

Gets or sets the dynamic elevation offset of the android view.

Ns Property ​

Overrides ​

ts
ViewCommon.androidDynamicElevationOffset

androidElevation ​

ts
androidElevation: number;

Defined in: ui/core/view/index.d.ts:371

Gets or sets the elevation of the android view.

Ns Property ​

Overrides ​

ts
ViewCommon.androidElevation

androidOverflowEdge ​

ts
androidOverflowEdge: AndroidOverflow;

Defined in: ui/core/view/view-common.ts

Inherited from ​

ts
ViewCommon.androidOverflowEdge

automationText ​

ts
automationText: string;

Defined in: ui/core/view/index.d.ts:364

Ns Property ​

Overrides ​

ts
ViewCommon.automationText

background ​

ts
background: string;

Defined in: ui/core/view/index.d.ts:385

Gets or sets the background style property.

Ns Property ​

Overrides ​

ts
ViewCommon.background

backgroundColor ​

ts
backgroundColor: string | Color;

Defined in: ui/core/view/index.d.ts:392

Gets or sets the background color of the view.

Ns Property ​

Overrides ​

ts
ViewCommon.backgroundColor

backgroundImage ​

ts
backgroundImage: string | LinearGradient;

Defined in: ui/core/view/index.d.ts:399

Gets or sets the background image of the view.

Ns Property ​

Overrides ​

ts
ViewCommon.backgroundImage

bindingContext ​

ts
bindingContext: any;

Defined in: ui/core/view/index.d.ts:134

Gets or sets the binding context of this instance. This object is used as a source for each Binding that does not have a source object specified.

Ns Property ​

Overrides ​

ts
ViewCommon.bindingContext

borderBottomColor ​

ts
borderBottomColor: Color;

Defined in: ui/core/view/index.d.ts:162

Gets or sets the bottom border color of the view.

Ns Property ​

Overrides ​

ts
ViewCommon.borderBottomColor

borderBottomLeftRadius ​

ts
borderBottomLeftRadius: LengthType;

Defined in: ui/core/view/index.d.ts:239

Gets or sets the bottom left border radius of the view.

Ns Property ​

Overrides ​

ts
ViewCommon.borderBottomLeftRadius

borderBottomRightRadius ​

ts
borderBottomRightRadius: LengthType;

Defined in: ui/core/view/index.d.ts:232

Gets or sets the bottom right border radius of the view.

Ns Property ​

Overrides ​

ts
ViewCommon.borderBottomRightRadius

borderBottomWidth ​

ts
borderBottomWidth: LengthType;

Defined in: ui/core/view/index.d.ts:197

Gets or sets the bottom border width of the view.

Ns Property ​

Overrides ​

ts
ViewCommon.borderBottomWidth

borderColor ​

ts
borderColor: string | Color;

Defined in: ui/core/view/index.d.ts:141

Gets or sets the border color of the view.

Ns Property ​

Overrides ​

ts
ViewCommon.borderColor

borderLeftColor ​

ts
borderLeftColor: Color;

Defined in: ui/core/view/index.d.ts:169

Gets or sets the left border color of the view.

Ns Property ​

Overrides ​

ts
ViewCommon.borderLeftColor

borderLeftWidth ​

ts
borderLeftWidth: LengthType;

Defined in: ui/core/view/index.d.ts:204

Gets or sets the left border width of the view.

Ns Property ​

Overrides ​

ts
ViewCommon.borderLeftWidth

borderRadius ​

ts
borderRadius: 
  | string
  | number
  | LengthDipUnit
  | LengthPxUnit;

Defined in: ui/core/view/index.d.ts:211

Gets or sets the border radius of the view.

Ns Property ​

Overrides ​

ts
ViewCommon.borderRadius

borderRightColor ​

ts
borderRightColor: Color;

Defined in: ui/core/view/index.d.ts:155

Gets or sets the right border color of the view.

Ns Property ​

Overrides ​

ts
ViewCommon.borderRightColor

borderRightWidth ​

ts
borderRightWidth: LengthType;

Defined in: ui/core/view/index.d.ts:190

Gets or sets the right border width of the view.

Ns Property ​

Overrides ​

ts
ViewCommon.borderRightWidth

borderTopColor ​

ts
borderTopColor: Color;

Defined in: ui/core/view/index.d.ts:148

Gets or sets the top border color of the view.

Ns Property ​

Overrides ​

ts
ViewCommon.borderTopColor

borderTopLeftRadius ​

ts
borderTopLeftRadius: LengthType;

Defined in: ui/core/view/index.d.ts:218

Gets or sets the top left border radius of the view.

Ns Property ​

Overrides ​

ts
ViewCommon.borderTopLeftRadius

borderTopRightRadius ​

ts
borderTopRightRadius: LengthType;

Defined in: ui/core/view/index.d.ts:225

Gets or sets the top right border radius of the view.

Ns Property ​

Overrides ​

ts
ViewCommon.borderTopRightRadius

borderTopWidth ​

ts
borderTopWidth: LengthType;

Defined in: ui/core/view/index.d.ts:183

Gets or sets the top border width of the view.

Ns Property ​

Overrides ​

ts
ViewCommon.borderTopWidth

borderWidth ​

ts
borderWidth: 
  | string
  | number
  | LengthDipUnit
  | LengthPxUnit;

Defined in: ui/core/view/index.d.ts:176

Gets or sets the border width of the view.

Ns Property ​

Overrides ​

ts
ViewCommon.borderWidth

boxShadow ​

ts
boxShadow: string | ShadowCSSValues[];

Defined in: ui/core/view/index.d.ts:406

Gets or sets the box shadow of the view.

Ns Property ​

Overrides ​

ts
ViewCommon.boxShadow

className ​

ts
className: string;

Defined in: ui/core/view-base/index.ts

Gets or sets the CSS class name for this view.

Ns Property ​

Inherited from ​

ts
ViewCommon.className

col ​

ts
col: number;

Defined in: ui/core/view-base/index.ts

The column for the element. The columns are 0-indexed, so the first column is indicated by 0.

Ns Property ​

Inherited from ​

ts
ViewCommon.col

color ​

ts
color: Color;

Defined in: ui/core/view/index.d.ts:246

Gets or sets the color of the view.

Ns Property ​

Overrides ​

ts
ViewCommon.color

colSpan ​

ts
colSpan: number;

Defined in: ui/core/view-base/index.ts

The number of columns for the element to span across.

Ns Property ​

Inherited from ​

ts
ViewCommon.colSpan

column ​

ts
column: number;

Defined in: ui/core/view-base/index.ts

The column for the element. The columns are 0-indexed, so the first column is indicated by 0.

Ns Property ​

Inherited from ​

ts
ViewCommon.column

columnSpan ​

ts
columnSpan: number;

Defined in: ui/core/view-base/index.ts

Ns Property ​

Inherited from ​

ts
ViewCommon.columnSpan

cssClasses ​

ts
cssClasses: Set<string>;

Defined in: ui/core/view/index.d.ts:711

Overrides ​

ts
ViewCommon.cssClasses

cssPseudoClasses ​

ts
cssPseudoClasses: Set<string>;

Defined in: ui/core/view/index.d.ts:712

Overrides ​

ts
ViewCommon.cssPseudoClasses

cssType ​

ts
cssType: string;

Defined in: ui/core/view/index.d.ts:693

Gets the CSS fully qualified type name. Using this as element type should allow for PascalCase and kebap-case selectors, when fully qualified, to match the element.

Overrides ​

ts
ViewCommon.cssType

defaultVisualState ​

ts
defaultVisualState: string;

Defined in: ui/core/view-base/index.ts

Default visual state, defaults to 'normal'

Ns Property ​

Inherited from ​

ts
ViewCommon.defaultVisualState

direction ​

ts
direction: LayoutDirectionType;

Defined in: ui/core/view/index.d.ts:413

Gets or sets the layout direction of the view.

Ns Property ​

Overrides ​

ts
ViewCommon.direction

dock ​

ts
dock: "left" | "right" | "top" | "bottom";

Defined in: ui/core/view-base/index.ts

Dock position of the view within its parent.

Ns Property ​

Inherited from ​

LiquidGlassContainer.dock


domNode ​

ts
domNode: DOMNode;

Defined in: ui/core/view-base/index.ts

Inherited from ​

ts
ViewCommon.domNode

effectiveBorderBottomWidth ​

ts
effectiveBorderBottomWidth: number;

Defined in: ui/core/view-base/index.ts

Inherited from ​

ts
ViewCommon.effectiveBorderBottomWidth

effectiveBorderLeftWidth ​

ts
effectiveBorderLeftWidth: number;

Defined in: ui/core/view-base/index.ts

Inherited from ​

ts
ViewCommon.effectiveBorderLeftWidth

effectiveBorderRightWidth ​

ts
effectiveBorderRightWidth: number;

Defined in: ui/core/view-base/index.ts

Inherited from ​

ts
ViewCommon.effectiveBorderRightWidth

effectiveBorderTopWidth ​

ts
effectiveBorderTopWidth: number;

Defined in: ui/core/view-base/index.ts

Inherited from ​

ts
ViewCommon.effectiveBorderTopWidth

effectiveColumnGap ​

ts
effectiveColumnGap: number;

Defined in: ui/core/view-base/index.ts

Inherited from ​

ts
ViewCommon.effectiveColumnGap

effectiveHeight ​

ts
effectiveHeight: number;

Defined in: ui/core/view-base/index.ts

Inherited from ​

ts
ViewCommon.effectiveHeight

effectiveLeft ​

ts
effectiveLeft: number;

Defined in: ui/core/view-base/index.ts

Inherited from ​

ts
ViewCommon.effectiveLeft

effectiveMarginBottom ​

ts
effectiveMarginBottom: number;

Defined in: ui/core/view-base/index.ts

Inherited from ​

ts
ViewCommon.effectiveMarginBottom

effectiveMarginLeft ​

ts
effectiveMarginLeft: number;

Defined in: ui/core/view-base/index.ts

Inherited from ​

ts
ViewCommon.effectiveMarginLeft

effectiveMarginRight ​

ts
effectiveMarginRight: number;

Defined in: ui/core/view-base/index.ts

Inherited from ​

ts
ViewCommon.effectiveMarginRight

effectiveMarginTop ​

ts
effectiveMarginTop: number;

Defined in: ui/core/view-base/index.ts

Inherited from ​

ts
ViewCommon.effectiveMarginTop

effectiveMaxHeight ​

ts
effectiveMaxHeight: number;

Defined in: ui/core/view-base/index.ts

Inherited from ​

ts
ViewCommon.effectiveMaxHeight

effectiveMaxWidth ​

ts
effectiveMaxWidth: number;

Defined in: ui/core/view-base/index.ts

Inherited from ​

ts
ViewCommon.effectiveMaxWidth

effectiveMinHeight ​

ts
effectiveMinHeight: number;

Defined in: ui/core/view-base/index.ts

Inherited from ​

ts
ViewCommon.effectiveMinHeight

effectiveMinWidth ​

ts
effectiveMinWidth: number;

Defined in: ui/core/view-base/index.ts

Inherited from ​

ts
ViewCommon.effectiveMinWidth

effectiveRowGap ​

ts
effectiveRowGap: number;

Defined in: ui/core/view-base/index.ts

Inherited from ​

ts
ViewCommon.effectiveRowGap

effectiveTop ​

ts
effectiveTop: number;

Defined in: ui/core/view-base/index.ts

Inherited from ​

ts
ViewCommon.effectiveTop

effectiveWidth ​

ts
effectiveWidth: number;

Defined in: ui/core/view-base/index.ts

Inherited from ​

ts
ViewCommon.effectiveWidth

flex ​

ts
flex: Flex;

Defined in: ui/core/view/index.d.ts:604

The flex shorthand property sets how a flex item will grow or shrink to fit the space available in its flex container.

Ns Property ​

Overrides ​

ts
ViewCommon.flex

flexFlow ​

ts
flexFlow: FlexFlow;

Defined in: ui/core/view/index.d.ts:599

The flex-flow Shorthand property specifies the direction of a flex container, as well as its wrapping behavior.

Ns Property ​

Overrides ​

ts
ViewCommon.flexFlow

flexGrow ​

ts
flexGrow: number;

Defined in: ui/core/view-base/index.ts

Indicates that the child should grow in size, if necessary. Sets how much the child will grow in proportion to the rest of the child elements in the flex container.

Ns Property ​

Inherited from ​

ts
ViewCommon.flexGrow

flexShrink ​

ts
flexShrink: number;

Defined in: ui/core/view-base/index.ts

Indicates that the child should shrink when the row runs out of space. Sets how much the flex item will shrink in proportion to the rest of the child elements in the flex container. When not specified, its value is set to 1.

Ns Property ​

Inherited from ​

ts
ViewCommon.flexShrink

flexWrapBefore ​

ts
flexWrapBefore: boolean;

Defined in: ui/core/view-base/index.ts

When true, forces the item to wrap onto a new line.

Ns Property ​

Inherited from ​

ts
ViewCommon.flexWrapBefore

height ​

ts
height: PercentLengthType;

Defined in: ui/core/view/index.d.ts:457

Gets or sets the desired height of the view.

Ns Property ​

Overrides ​

ts
ViewCommon.height

hidden ​

ts
hidden: boolean;

Defined in: ui/core/view-base/index.ts

Gets or sets the visual state of the view.

Ns Property ​

Inherited from ​

ts
ViewCommon.hidden

horizontalAlignment ​

ts
horizontalAlignment: HorizontalAlignmentType;

Defined in: ui/core/view/index.d.ts:499

Gets or sets the alignment of this view within its parent along the Horizontal axis.

Ns Property ​

Overrides ​

ts
ViewCommon.horizontalAlignment

id ​

ts
id: string;

Defined in: ui/core/view-base/index.ts

Gets or sets the id for this view.

Ns Property ​

Inherited from ​

ts
ViewCommon.id

ignoreTouchAnimation ​

ts
ignoreTouchAnimation: boolean;

Defined in: ui/core/view/index.d.ts:673

Ns Property ​

Overrides ​

ts
ViewCommon.ignoreTouchAnimation

ios ​

ts
ios: any;

Defined in: ui/core/view/index.d.ts:127

Gets the ios-specific native instance that lies behind this proxy. Will be available if running on an iOS platform.

Overrides ​

ts
ViewCommon.ios

iosAccessibilityAdjustsFontSize ​

ts
iosAccessibilityAdjustsFontSize: boolean;

Defined in: ui/core/view/index.d.ts:339

Defines whether accessibility font scale should affect font size.

Ns Property ​

Overrides ​

ts
ViewCommon.iosAccessibilityAdjustsFontSize

iosAccessibilityMaxFontScale ​

ts
iosAccessibilityMaxFontScale: number;

Defined in: ui/core/view/index.d.ts:353

Gets or sets the maximum accessibility font scale.

Ns Property ​

Overrides ​

ts
ViewCommon.iosAccessibilityMaxFontScale

iosAccessibilityMinFontScale ​

ts
iosAccessibilityMinFontScale: number;

Defined in: ui/core/view/index.d.ts:346

Gets or sets the minimum accessibility font scale.

Ns Property ​

Overrides ​

ts
ViewCommon.iosAccessibilityMinFontScale

iosGlassEffect ​

ts
iosGlassEffect: GlassEffectType;

Defined in: ui/core/view/index.d.ts:660

Set the iOS liquid glass effect style on the view.

Ns Property ​

Overrides ​

ts
ViewCommon.iosGlassEffect

iosIgnoreSafeArea ​

ts
iosIgnoreSafeArea: boolean;

Defined in: ui/core/view/index.d.ts:639

Gets or sets a value indicating whether the the view should totally ignore safe areas computation. This property is iOS specific. Default value: false

Ns Property ​

Overrides ​

ts
ViewCommon.iosIgnoreSafeArea

iosOverflowSafeArea ​

ts
iosOverflowSafeArea: boolean;

Defined in: ui/core/view/index.d.ts:625

Instruct container view to expand beyond the safe area. This property is iOS specific. Default value: false

Ns Property ​

Overrides ​

ts
ViewCommon.iosOverflowSafeArea

iosOverflowSafeAreaEnabled ​

ts
iosOverflowSafeAreaEnabled: boolean;

Defined in: ui/core/view/index.d.ts:632

Enables or disables the iosOverflowSafeArea property for all children. This property is iOS specific. Default value: true

Ns Property ​

Overrides ​

ts
ViewCommon.iosOverflowSafeAreaEnabled

isCollapsed ​

ts
isCollapsed: any;

Defined in: ui/core/view-base/index.ts

Returns true if visibility is set to 'collapse'. Default(false) set in prototype Readonly property

Inherited from ​

ts
ViewCommon.isCollapsed

isEnabled ​

ts
isEnabled: boolean;

Defined in: ui/core/view/index.d.ts:611

Gets or sets a value indicating whether the the view is enabled. This affects the appearance of the view.

Ns Property ​

Overrides ​

ts
ViewCommon.isEnabled

isLayoutValid ​

ts
isLayoutValid: boolean;

Defined in: ui/core/view/index.d.ts:682

Gets if layout is valid. This is a read-only property.

Overrides ​

ts
ViewCommon.isLayoutValid

isUserInteractionEnabled ​

ts
isUserInteractionEnabled: boolean;

Defined in: ui/core/view/index.d.ts:618

Gets or sets a value indicating whether the user can interact with the view. This does not affect the appearance of the view.

Ns Property ​

Overrides ​

ts
ViewCommon.isUserInteractionEnabled

left ​

ts
left: LengthType;

Defined in: ui/core/view-base/index.ts

Gets or sets the distance, in pixels, between the left edge of the child and the left edge of its parent.

Ns Property ​

Inherited from ​

ts
ViewCommon.left

margin ​

ts
margin: 
  | string
  | number
  | LengthDipUnit
  | LengthPxUnit
  | LengthPercentUnit;

Defined in: ui/core/view/index.d.ts:464

Gets or sets margin style property.

Ns Property ​

Overrides ​

ts
ViewCommon.margin

marginBottom ​

ts
marginBottom: PercentLengthType;

Defined in: ui/core/view/index.d.ts:492

Specifies extra space on the bottom side of this view.

Ns Property ​

Overrides ​

ts
ViewCommon.marginBottom

marginLeft ​

ts
marginLeft: PercentLengthType;

Defined in: ui/core/view/index.d.ts:471

Specifies extra space on the left side of this view.

Ns Property ​

Overrides ​

ts
ViewCommon.marginLeft

marginRight ​

ts
marginRight: PercentLengthType;

Defined in: ui/core/view/index.d.ts:485

Specifies extra space on the right side of this view.

Ns Property ​

Overrides ​

ts
ViewCommon.marginRight

marginTop ​

ts
marginTop: PercentLengthType;

Defined in: ui/core/view/index.d.ts:478

Specifies extra space on the top side of this view.

Ns Property ​

Overrides ​

ts
ViewCommon.marginTop

maxHeight ​

ts
maxHeight: PercentLengthType;

Defined in: ui/core/view/index.d.ts:443

Gets or sets the maximum height the view may grow to. Accepts a fixed length or a percentage of the available height. Defaults to 'auto' (no maximum).

Ns Property ​

Overrides ​

ts
ViewCommon.maxHeight

maxWidth ​

ts
maxWidth: PercentLengthType;

Defined in: ui/core/view/index.d.ts:435

Gets or sets the maximum width the view may grow to. Accepts a fixed length or a percentage of the available width. Defaults to 'auto' (no maximum).

Ns Property ​

Overrides ​

ts
ViewCommon.maxWidth

minHeight ​

ts
minHeight: LengthType;

Defined in: ui/core/view/index.d.ts:427

Gets or sets the minimum height the view may grow to.

Ns Property ​

Overrides ​

ts
ViewCommon.minHeight

minWidth ​

ts
minWidth: LengthType;

Defined in: ui/core/view/index.d.ts:420

Gets or sets the minimum width the view may grow to.

Ns Property ​

Overrides ​

ts
ViewCommon.minWidth

ts
modal: View;

Defined in: ui/core/view/index.d.ts:874

Returns the current modal view that this page is showing (is parent of), if any.

Overrides ​

ts
ViewCommon.modal

nativeBackgroundState? ​

ts
optional nativeBackgroundState?: "unset" | "invalid" | "drawn";

Defined in: ui/core/view/index.d.ts:687

Native background states. This is a read-only property.


nativeViewProtected ​

ts
nativeViewProtected: any;

Defined in: ui/core/view-base/index.ts

read-only. If you want to set out-of-band the nativeView use the setNativeView method.

Inherited from ​

ts
ViewCommon.nativeViewProtected

opacity ​

ts
opacity: number;

Defined in: ui/core/view/index.d.ts:520

Gets or sets the opacity style property.

Ns Property ​

Overrides ​

ts
ViewCommon.opacity

order ​

ts
order: number;

Defined in: ui/core/view-base/index.ts

Sets the order in which child elements inside a Flex appear in relation to one another.

Ns Property ​

Inherited from ​

ts
ViewCommon.order

originX ​

ts
originX: number;

Defined in: ui/core/view/index.d.ts:586

Gets or sets the X component of the origin point around which the view will be transformed. The default value is 0.5 representing the center of the view.

Ns Property ​

Overrides ​

ts
ViewCommon.originX

originY ​

ts
originY: number;

Defined in: ui/core/view/index.d.ts:593

Gets or sets the Y component of the origin point around which the view will be transformed. The default value is 0.5 representing the center of the view.

Ns Property ​

Overrides ​

ts
ViewCommon.originY

parent ​

ts
parent: ViewBase;

Defined in: ui/core/view-base/index.ts

Gets the parent view. This property is read-only.

Inherited from ​

ts
ViewCommon.parent

perspective ​

ts
perspective: number;

Defined in: ui/core/view/index.d.ts:549

Gets or sets the distance of the camera form the view perspective. Usually needed when rotating the view over the X or Y axis.

Ns Property ​

Overrides ​

ts
ViewCommon.perspective

recycleNativeView ​

ts
recycleNativeView: "auto" | "always" | "never";

Defined in: ui/core/view-base/index.ts

Inherited from ​

ViewBase.recycleNativeView


reusable ​

ts
reusable: boolean;

Defined in: ui/core/view-base/index.ts

Gets or sets if the view is reusable. Reusable views are not automatically destroyed when removed from the View tree.

Ns Property ​

Inherited from ​

ts
ViewCommon.reusable

rotate ​

ts
rotate: number;

Defined in: ui/core/view/index.d.ts:527

Gets or sets the rotate affine transform of the view along the Z axis.

Ns Property ​

Overrides ​

ts
ViewCommon.rotate

rotateX ​

ts
rotateX: number;

Defined in: ui/core/view/index.d.ts:534

Gets or sets the rotate affine transform of the view along the X axis.

Ns Property ​

Overrides ​

ts
ViewCommon.rotateX

rotateY ​

ts
rotateY: number;

Defined in: ui/core/view/index.d.ts:541

Gets or sets the rotate affine transform of the view along the Y axis.

Ns Property ​

Overrides ​

ts
ViewCommon.rotateY

row ​

ts
row: number;

Defined in: ui/core/view-base/index.ts

The row for the element. The rows are 0-indexed, so the first row is indicated by 0.

Ns Property ​

Inherited from ​

ts
ViewCommon.row

rowSpan ​

ts
rowSpan: number;

Defined in: ui/core/view-base/index.ts

The number of rows for the element to span across.

Ns Property ​

Inherited from ​

ts
ViewCommon.rowSpan

scaleX ​

ts
scaleX: number;

Defined in: ui/core/view/index.d.ts:570

Gets or sets the scaleX affine transform of the view.

Ns Property ​

Overrides ​

ts
ViewCommon.scaleX

scaleY ​

ts
scaleY: number;

Defined in: ui/core/view/index.d.ts:577

Gets or sets the scaleY affine transform of the view.

Ns Property ​

Overrides ​

ts
ViewCommon.scaleY

sharedTransitionIgnore ​

ts
sharedTransitionIgnore: boolean;

Defined in: ui/core/view-base/index.ts

Opt out of shared transition under different binding conditions

Ns Property ​

Inherited from ​

ts
ViewCommon.sharedTransitionIgnore

sharedTransitionTag ​

ts
sharedTransitionTag: string;

Defined in: ui/core/view-base/index.ts

Gets or sets the shared transition tag for animated view transitions

Ns Property ​

Inherited from ​

ts
ViewCommon.sharedTransitionTag

statusBarStyle ​

ts
statusBarStyle: "dark" | "light";

Defined in: ui/core/view/index.d.ts:709

Gets or sets the status bar style for this view. Platform Notes:

False value will make this property have no effect.

Ns Property ​

Overrides ​

ts
ViewCommon.statusBarStyle

testID ​

ts
testID: string;

Defined in: ui/core/view/index.d.ts:665

Ns Property ​

Overrides ​

ts
ViewCommon.testID

top ​

ts
top: LengthType;

Defined in: ui/core/view-base/index.ts

Gets or sets the distance, in pixels, between the top edge of the child and the top edge of its parent.

Ns Property ​

Inherited from ​

ts
ViewCommon.top

touchAnimation ​

ts
touchAnimation: 
  | boolean
  | TouchAnimationOptions;

Defined in: ui/core/view/index.d.ts:669

Ns Property ​

Overrides ​

ts
ViewCommon.touchAnimation

touchDelay ​

ts
touchDelay: number;

Defined in: ui/core/view/index.d.ts:677

Ns Property ​

Overrides ​

ts
ViewCommon.touchDelay

transitionId ​

ts
transitionId: number;

Defined in: ui/core/view/view-common.ts

Active transition instance id for tracking state

Inherited from ​

ts
ViewCommon.transitionId

translateX ​

ts
translateX: number;

Defined in: ui/core/view/index.d.ts:556

Gets or sets the translateX affine transform of the view in device independent pixels.

Ns Property ​

Overrides ​

ts
ViewCommon.translateX

translateY ​

ts
translateY: number;

Defined in: ui/core/view/index.d.ts:563

Gets or sets the translateY affine transform of the view in device independent pixels.

Ns Property ​

Overrides ​

ts
ViewCommon.translateY

verticalAlignment ​

ts
verticalAlignment: VerticalAlignmentType;

Defined in: ui/core/view/index.d.ts:506

Gets or sets the alignment of this view within its parent along the Vertical axis.

Ns Property ​

Overrides ​

ts
ViewCommon.verticalAlignment

viewController ​

ts
viewController: any;

Defined in: ui/core/view-base/index.ts

returns the native UIViewController.

Inherited from ​

ts
ViewCommon.viewController

visibility ​

ts
visibility: VisibilityType;

Defined in: ui/core/view/index.d.ts:513

Gets or sets the visibility of the view.

Ns Property ​

Overrides ​

ts
ViewCommon.visibility

visionHoverStyle ​

ts
visionHoverStyle: string | VisionHoverOptions;

Defined in: ui/core/view/index.d.ts:653

visionOS only

Ns Property ​

Overrides ​

ts
ViewCommon.visionHoverStyle

visionIgnoreHoverStyle ​

ts
visionIgnoreHoverStyle: boolean;

Defined in: ui/core/view/index.d.ts:646

visionOS only

Ns Property ​

Overrides ​

ts
ViewCommon.visionIgnoreHoverStyle

width ​

ts
width: PercentLengthType;

Defined in: ui/core/view/index.d.ts:450

Gets or sets the desired width of the view.

Ns Property ​

Overrides ​

ts
ViewCommon.width

accessibilityBlurEvent ​

ts
static accessibilityBlurEvent: string;

Defined in: ui/core/view/index.d.ts:89

String value used when hooking to accessibilityBlur event.

Ns Event ​

accessibilityBlur

Overrides ​

ts
ViewCommon.accessibilityBlurEvent

accessibilityFocusChangedEvent ​

ts
static accessibilityFocusChangedEvent: string;

Defined in: ui/core/view/index.d.ts:103

String value used when hooking to accessibilityFocusChanged event.

Ns Event ​

accessibilityFocusChanged

Overrides ​

ts
ViewCommon.accessibilityFocusChangedEvent

accessibilityFocusEvent ​

ts
static accessibilityFocusEvent: string;

Defined in: ui/core/view/index.d.ts:96

String value used when hooking to accessibilityFocus event.

Ns Event ​

accessibilityFocus

Overrides ​

ts
ViewCommon.accessibilityFocusEvent

accessibilityPerformEscapeEvent ​

ts
static accessibilityPerformEscapeEvent: string;

Defined in: ui/core/view/view-common.ts

Inherited from ​

ts
ViewCommon.accessibilityPerformEscapeEvent

androidOverflowInsetEvent ​

ts
static androidOverflowInsetEvent: string;

Defined in: ui/core/view/index.d.ts:110

String value used when hooking to androidOverflowInset event.

Ns Event ​

androidOverflowInset

Overrides ​

ts
ViewCommon.androidOverflowInsetEvent

closedModallyEvent ​

ts
static closedModallyEvent: string;

Defined in: ui/core/view/index.d.ts:82

String value used when hooking to closedModally event. Fired on the modal view once its native dismissal has fully completed (after the close callback and UI teardown).

Ns Event ​

closedModally

Overrides ​

ts
ViewCommon.closedModallyEvent

createdEvent ​

ts
static createdEvent: string;

Defined in: ui/core/view-base/index.ts

String value used when hooking to creation event

Ns Event ​

created

Inherited from ​

ts
ViewCommon.createdEvent

disposeNativeViewEvent ​

ts
static disposeNativeViewEvent: string;

Defined in: ui/core/view-base/index.ts

String value used when hooking to disposeNativeView event

Ns Event ​

disposeNativeView

Inherited from ​

ts
ViewCommon.disposeNativeViewEvent

layoutChangedEvent ​

ts
static layoutChangedEvent: string;

Defined in: ui/core/view/index.d.ts:60

String value used when hooking to layoutChanged event.

Ns Event ​

layoutChanged

Overrides ​

ts
ViewCommon.layoutChangedEvent

loadedEvent ​

ts
static loadedEvent: string;

Defined in: ui/core/view-base/index.ts

String value used when hooking to loaded event.

Ns Event ​

loaded

Inherited from ​

ts
ViewCommon.loadedEvent

propertyChangeEvent ​

ts
static propertyChangeEvent: string;

Defined in: data/observable/index.ts

String value used when hooking to propertyChange event.

Ns Event ​

propertyChange

Inherited from ​

ts
ViewCommon.propertyChangeEvent

showingModallyEvent ​

ts
static showingModallyEvent: string;

Defined in: ui/core/view/index.d.ts:66

String value used when hooking to showingModally event.

Ns Event ​

showingModally

Overrides ​

ts
ViewCommon.showingModallyEvent

shownModallyEvent ​

ts
static shownModallyEvent: string;

Defined in: ui/core/view/index.d.ts:73

String value used when hooking to shownModally event.

Ns Event ​

shownModally

Overrides ​

ts
ViewCommon.shownModallyEvent

unloadedEvent ​

ts
static unloadedEvent: string;

Defined in: ui/core/view-base/index.ts

String value used when hooking to unloaded event.

Ns Event ​

unloaded

Inherited from ​

ts
ViewCommon.unloadedEvent

Accessors ​

backgroundPosition ​

Get Signature ​

ts
get backgroundPosition(): string;

Defined in: ui/core/view/view-common.ts

Returns ​

string

Set Signature ​

ts
set backgroundPosition(value: string): void;

Defined in: ui/core/view/view-common.ts

Parameters ​
ParameterType
valuestring
Returns ​

void

Inherited from ​

ts
ViewCommon.backgroundPosition

backgroundRepeat ​

Get Signature ​

ts
get backgroundRepeat(): BackgroundRepeatType;

Defined in: ui/core/view/view-common.ts

Returns ​

BackgroundRepeatType

Set Signature ​

ts
set backgroundRepeat(value: BackgroundRepeatType): void;

Defined in: ui/core/view/view-common.ts

Parameters ​
ParameterType
valueBackgroundRepeatType
Returns ​

void

Inherited from ​

ts
ViewCommon.backgroundRepeat

backgroundSize ​

Get Signature ​

ts
get backgroundSize(): string;

Defined in: ui/core/view/view-common.ts

Returns ​

string

Set Signature ​

ts
set backgroundSize(value: string): void;

Defined in: ui/core/view/view-common.ts

Parameters ​
ParameterType
valuestring
Returns ​

void

Inherited from ​

ts
ViewCommon.backgroundSize

class ​

Get Signature ​

ts
get class(): string;

Defined in: ui/core/view-base/index.ts

Returns ​

string

Set Signature ​

ts
set class(v: string): void;

Defined in: ui/core/view-base/index.ts

Parameters ​
ParameterType
vstring
Returns ​

void

Inherited from ​

ts
ViewCommon.class

effectivePaddingBottom ​

Get Signature ​

ts
get effectivePaddingBottom(): number;

Defined in: ui/core/view-base/index.ts

Returns ​

number

Set Signature ​

ts
set effectivePaddingBottom(v: number): void;

Defined in: ui/core/view-base/index.ts

Parameters ​
ParameterType
vnumber
Returns ​

void

Inherited from ​

ts
ViewCommon.effectivePaddingBottom

effectivePaddingLeft ​

Get Signature ​

ts
get effectivePaddingLeft(): number;

Defined in: ui/core/view-base/index.ts

Returns ​

number

Set Signature ​

ts
set effectivePaddingLeft(v: number): void;

Defined in: ui/core/view-base/index.ts

Parameters ​
ParameterType
vnumber
Returns ​

void

Inherited from ​

ts
ViewCommon.effectivePaddingLeft

effectivePaddingRight ​

Get Signature ​

ts
get effectivePaddingRight(): number;

Defined in: ui/core/view-base/index.ts

Returns ​

number

Set Signature ​

ts
set effectivePaddingRight(v: number): void;

Defined in: ui/core/view-base/index.ts

Parameters ​
ParameterType
vnumber
Returns ​

void

Inherited from ​

ts
ViewCommon.effectivePaddingRight

effectivePaddingTop ​

Get Signature ​

ts
get effectivePaddingTop(): number;

Defined in: ui/core/view-base/index.ts

Returns ​

number

Set Signature ​

ts
set effectivePaddingTop(v: number): void;

Defined in: ui/core/view-base/index.ts

Parameters ​
ParameterType
vnumber
Returns ​

void

Inherited from ​

ts
ViewCommon.effectivePaddingTop

isLoaded ​

Get Signature ​

ts
get isLoaded(): boolean;

Defined in: ui/core/view-base/index.ts

Returns ​

boolean

Inherited from ​

ts
ViewCommon.isLoaded

nativeView ​

Get Signature ​

ts
get nativeView(): any;

Defined in: ui/core/view-base/index.ts

Returns ​

any

Set Signature ​

ts
set nativeView(value: any): void;

Defined in: ui/core/view-base/index.ts

Parameters ​
ParameterType
valueany
Returns ​

void

Inherited from ​

ts
ViewCommon.nativeView

page ​

Get Signature ​

ts
get page(): Page;

Defined in: ui/core/view-base/index.ts

Gets owner page. This is a read-only property.

Returns ​

Page

Inherited from ​

ts
ViewCommon.page

parentNode ​

Get Signature ​

ts
get parentNode(): ViewBase;

Defined in: ui/core/view-base/index.ts

Gets the template parent or the native parent. Sets the template parent.

Returns ​

ViewBase

Set Signature ​

ts
set parentNode(node: ViewBase): void;

Defined in: ui/core/view-base/index.ts

Parameters ​
ParameterType
nodeViewBase
Returns ​

void

Inherited from ​

ts
ViewCommon.parentNode

style ​

Get Signature ​

ts
get style(): Style;

Defined in: ui/core/view-base/index.ts

Gets the style object associated to this view.

Returns ​

Style

Set Signature ​

ts
set style(inlineStyle: Style): void;

Defined in: ui/core/view-base/index.ts

Ns Property ​
Parameters ​
ParameterType
inlineStyleStyle
Returns ​

void

Inherited from ​

ts
ViewCommon.style

textTransform ​

Get Signature ​

ts
get textTransform(): TextTransformType;

Defined in: ui/core/view/view-common.ts

Returns ​

TextTransformType

Set Signature ​

ts
set textTransform(value: TextTransformType): void;

Defined in: ui/core/view/view-common.ts

Parameters ​
ParameterType
valueTextTransformType
Returns ​

void

Inherited from ​

ts
ViewCommon.textTransform

typeName ​

Get Signature ​

ts
get typeName(): string;

Defined in: ui/core/view-base/index.ts

Gets the name of the constructor function for this instance. E.g. for a Button class this will return "Button".

Returns ​

string

Inherited from ​

ts
ViewCommon.typeName

visualState ​

Get Signature ​

ts
get visualState(): string;

Defined in: ui/core/view-base/index.ts

Deprecated ​
Returns ​

string

Inherited from ​

ts
ViewCommon.visualState

Methods ​

_addView() ​

ts
_addView(view: ViewBase, atIndex?: number): void;

Defined in: ui/core/view-base/index.ts

Parameters ​

ParameterType
viewViewBase
atIndex?number

Returns ​

void

Inherited from ​

ts
ViewCommon._addView

_addViewCore() ​

ts
_addViewCore(view: ViewBase, atIndex?: number): void;

Defined in: ui/core/view-base/index.ts

Method is intended to be overridden by inheritors and used as "protected"

Parameters ​

ParameterType
viewViewBase
atIndex?number

Returns ​

void

Inherited from ​

ts
ViewCommon._addViewCore

_addViewToNativeVisualTree() ​

ts
_addViewToNativeVisualTree(view: ViewBase, atIndex?: number): boolean;

Defined in: ui/core/view-base/index.ts

Performs the core logic of adding a child view to the native visual tree. Returns true if the view's native representation has been successfully added, false otherwise. Method is intended to be overridden by inheritors and used as "protected".

Parameters ​

ParameterType
viewViewBase
atIndex?number

Returns ​

boolean

Inherited from ​

ts
ViewCommon._addViewToNativeVisualTree

_applyGlassEffect() ​

ts
protected _applyGlassEffect(value: GlassEffectType, options: {
  effectType: "glass" | "container";
  onCreate?: (effectView: UIVisualEffectView, effect: UIVisualEffect) => void;
  onUpdate?: (effectView: UIVisualEffectView, effect: UIVisualEffect, duration: number) => void;
  targetView?: UIVisualEffectView;
  toGlassStyleFn?: (variant?: GlassEffectVariant) => number;
}): any;

Defined in: ui/core/view/view-common.ts

Shared helper method for applying glass effects to views. This method can be used by View and its subclasses (LiquidGlass, LiquidGlassContainer, etc.) iOS only at the moment but could be applied to others once supported in other platforms.

Parameters ​

ParameterTypeDescription
valueGlassEffectTypeThe glass effect configuration
options{ effectType: "glass" | "container"; onCreate?: (effectView: UIVisualEffectView, effect: UIVisualEffect) => void; onUpdate?: (effectView: UIVisualEffectView, effect: UIVisualEffect, duration: number) => void; targetView?: UIVisualEffectView; toGlassStyleFn?: (variant?: GlassEffectVariant) => number; }Configuration options for different glass effect behaviors
options.effectType"glass" | "container"Type of effect to create: 'glass'
options.onCreate?(effectView: UIVisualEffectView, effect: UIVisualEffect) => voidCallback when a new effect view is created (for initial setup)
options.onUpdate?(effectView: UIVisualEffectView, effect: UIVisualEffect, duration: number) => voidCallback when an existing effect view is updated
options.targetView?UIVisualEffectViewThe UIVisualEffectView to apply the effect to (if updating existing view)
options.toGlassStyleFn?(variant?: GlassEffectVariant) => numberCustom function to convert variant to UIGlassEffectStyle

Returns ​

any

Inherited from ​

ts
ViewCommon._applyGlassEffect

_applyXmlAttribute() ​

ts
_applyXmlAttribute(attribute: string, value: string): boolean;

Defined in: ui/core/view-base/index.ts

Parameters ​

ParameterType
attributestring
valuestring

Returns ​

boolean

Deprecated ​

This used to be the way to set attribute values in early {N} versions. Now attributes are expected to be set as plain properties on the view instances.

Inherited from ​

ts
ViewCommon._applyXmlAttribute

_batchUpdate() ​

ts
_batchUpdate<T>(callback: () => T): T;

Defined in: ui/core/view-base/index.ts

Allow multiple updates to be performed on the instance at once.

Type Parameters ​

Type Parameter
T

Parameters ​

ParameterType
callback() => T

Returns ​

T

Inherited from ​

ts
ViewCommon._batchUpdate

_childIndexToNativeChildIndex() ​

ts
_childIndexToNativeChildIndex(index?: number): number;

Defined in: ui/core/view-base/index.ts

Parameters ​

ParameterType
index?number

Returns ​

number

Inherited from ​

ts
ViewCommon._childIndexToNativeChildIndex

_closeAllModalViewsInternal() ​

ts
_closeAllModalViewsInternal(): boolean;

Defined in: ui/core/view/index.d.ts:950

Internal method: Closes all modal views. Should be used by plugins like nativescript-angular which implement their own modal views service.

Returns ​

boolean

Overrides ​

ts
ViewCommon._closeAllModalViewsInternal

_createPropertyChangeData() ​

ts
_createPropertyChangeData(
   propertyName: string, 
   value: any, 
   oldValue?: any): PropertyChangeData;

Defined in: data/observable/index.ts

This method is intended to be overriden by inheritors to provide additional implementation.

Parameters ​

ParameterType
propertyNamestring
valueany
oldValue?any

Returns ​

PropertyChangeData

Inherited from ​

ts
ViewCommon._createPropertyChangeData

_dialogClosed() ​

ts
_dialogClosed(): void;

Defined in: ui/core/view-base/index.ts

Method is intended to be overridden by inheritors and used as "protected"

Returns ​

void

Inherited from ​

ts
ViewCommon._dialogClosed

_eachLayoutView() ​

ts
_eachLayoutView(callback: (View: any) => void): void;

Defined in: ui/core/view/index.d.ts:982

Parameters ​

ParameterType
callback(View: any) => void

Returns ​

void

Overrides ​

ts
ViewCommon._eachLayoutView

_emit() ​

ts
_emit(eventName: string): void;

Defined in: data/observable/index.ts

Parameters ​

ParameterType
eventNamestring

Returns ​

void

Inherited from ​

ts
ViewCommon._emit

_getNativeViewsCount() ​

ts
_getNativeViewsCount(): number;

Defined in: ui/core/view/index.d.ts:944

Returns ​

number

Overrides ​

ts
ViewCommon._getNativeViewsCount

_getRootModalHost() ​

ts
_getRootModalHost(): ViewBase;

Defined in: ui/core/view/index.d.ts:963

Internal method: Walks up the view tree — through the presenting view of any modal on the way — to the root this view ultimately lives under, which is the root view of its window.

Returns ​

ViewBase

Overrides ​

ts
ViewCommon._getRootModalHost

_getRootModalViews() ​

ts
_getRootModalViews(): ViewBase[];

Defined in: ui/core/view/index.d.ts:956

Internal method: Gets all modal views of the current view.

Returns ​

ViewBase[]

Overrides ​

ts
ViewCommon._getRootModalViews

_getValue() ​

ts
_getValue(property: any): never;

Defined in: ui/core/view/index.d.ts:1170

Obsolete: There is a new property system that does not rely on _getValue.

Parameters ​

ParameterType
propertyany

Returns ​

never

Overrides ​

ts
ViewCommon._getValue

_handleLivesync() ​

ts
_handleLivesync(context?: {
  path: string;
  type: string;
}): boolean;

Defined in: ui/core/view/index.d.ts:1141

Parameters ​

ParameterType
context?{ path: string; type: string; }
context.path?string
context.type?string

Returns ​

boolean

Overrides ​

ts
ViewCommon._handleLivesync

_hasAncestorView() ​

ts
_hasAncestorView(ancestorView: View): boolean;

Defined in: ui/core/view/index.d.ts:1164

Checks whether the current view has specific view for an ancestor.

Parameters ​

ParameterType
ancestorViewView

Returns ​

boolean

Overrides ​

ts
ViewCommon._hasAncestorView

_hideNativeModalView() ​

ts
protected _hideNativeModalView(parent: ViewCommon, whenClosedCallback: () => void): void;

Defined in: ui/core/view/view-common.ts

Parameters ​

ParameterType
parentViewCommon
whenClosedCallback() => void

Returns ​

void

Inherited from ​

ts
ViewCommon._hideNativeModalView

_inheritStyles() ​

ts
_inheritStyles(view: ViewBase): void;

Defined in: ui/core/view-base/index.ts

Parameters ​

ParameterType
viewViewBase

Returns ​

void

Inherited from ​

ts
ViewCommon._inheritStyles

_inheritStyleScope() ​

ts
_inheritStyleScope(styleScope: StyleScope): void;

Defined in: ui/core/view-base/index.ts

Parameters ​

ParameterType
styleScopeStyleScope

Returns ​

void

Inherited from ​

ts
ViewCommon._inheritStyleScope

_layoutParent() ​

ts
_layoutParent(): void;

Defined in: ui/core/view-base/index.ts

Returns ​

void

Inherited from ​

ts
ViewCommon._layoutParent

_observe() ​

ts
protected _observe(
   type: GestureTypes, 
   callback: (args: GestureEventData) => void, 
   thisArg?: any): void;

Defined in: ui/core/view/view-common.ts

Parameters ​

ParameterType
typeGestureTypes
callback(args: GestureEventData) => void
thisArg?any

Returns ​

void

Inherited from ​

ts
ViewCommon._observe

_onAttachedToWindow() ​

ts
_onAttachedToWindow(): void;

Defined in: ui/core/view/index.d.ts:1154

Called in android when native view is attached to window.

Returns ​

void

Overrides ​

ts
ViewCommon._onAttachedToWindow

_onDetachedFromWindow() ​

ts
_onDetachedFromWindow(): void;

Defined in: ui/core/view/index.d.ts:1159

Called in android when native view is dettached from window.

Returns ​

void

Overrides ​

ts
ViewCommon._onDetachedFromWindow

_onRootViewReset() ​

ts
_onRootViewReset(): void;

Defined in: ui/core/view-base/index.ts

Method is intended to be overridden by inheritors and used as "protected"

Returns ​

void

Inherited from ​

ts
ViewCommon._onRootViewReset

_onSizeChanged()? ​

ts
optional _onSizeChanged(): void;

Defined in: ui/core/view/index.d.ts:987

iOS Only Internal method used to update various view details like background rerendering, border, etc.

Returns ​

void


_parentChanged() ​

ts
_parentChanged(oldParent: ViewBase): void;

Defined in: ui/core/view-base/index.ts

Parameters ​

ParameterType
oldParentViewBase

Returns ​

void

Inherited from ​

ts
ViewCommon._parentChanged

_raiseLayoutChangedEvent() ​

ts
protected _raiseLayoutChangedEvent(): void;

Defined in: ui/core/view/view-common.ts

Returns ​

void

Inherited from ​

ts
ViewCommon._raiseLayoutChangedEvent

_raiseShowingModallyEvent() ​

ts
protected _raiseShowingModallyEvent(): void;

Defined in: ui/core/view/view-common.ts

Returns ​

void

Inherited from ​

ts
ViewCommon._raiseShowingModallyEvent

_raiseShownModallyEvent() ​

ts
protected _raiseShownModallyEvent(): void;

Defined in: ui/core/view/view-common.ts

Returns ​

void

Inherited from ​

ts
ViewCommon._raiseShownModallyEvent

_removeView() ​

ts
_removeView(view: ViewBase): void;

Defined in: ui/core/view-base/index.ts

Core logic for removing a child view from this instance. Used by the framework to handle lifecycle events more centralized. Do not use outside the UI Stack implementation.

Parameters ​

ParameterType
viewViewBase

Returns ​

void

Inherited from ​

ts
ViewCommon._removeView

_removeViewCore() ​

ts
_removeViewCore(view: ViewBase): void;

Defined in: ui/core/view-base/index.ts

Method is intended to be overridden by inheritors and used as "protected"

Parameters ​

ParameterType
viewViewBase

Returns ​

void

Inherited from ​

ts
ViewCommon._removeViewCore

_removeViewFromNativeVisualTree() ​

ts
_removeViewFromNativeVisualTree(view: ViewBase): void;

Defined in: ui/core/view-base/index.ts

Method is intended to be overridden by inheritors and used as "protected"

Parameters ​

ParameterType
viewViewBase

Returns ​

void

Inherited from ​

ts
ViewCommon._removeViewFromNativeVisualTree

_resumeNativeUpdates() ​

ts
_resumeNativeUpdates(type: SuspendType): void;

Defined in: ui/core/view-base/index.ts

Parameters ​

ParameterType
typeSuspendType

Returns ​

void

Inherited from ​

ts
ViewCommon._resumeNativeUpdates

_setDefaultPaddings() ​

ts
_setDefaultPaddings(insets: any): void;

Defined in: ui/core/view-base/index.ts

Parameters ​

ParameterType
insetsany

Returns ​

void

Inherited from ​

ts
ViewCommon._setDefaultPaddings

_setupAsRootView() ​

ts
_setupAsRootView(context: any): void;

Defined in: ui/core/view/view-common.ts

Parameters ​

ParameterType
contextany

Returns ​

void

Inherited from ​

ts
ViewCommon._setupAsRootView

_setupUI() ​

ts
_setupUI(
   context: any, 
   atIndex?: number, 
   parentIsLoaded?: boolean): void;

Defined in: ui/core/view-base/index.ts

Setups the UI for ViewBase and all its children recursively. This method should not be overridden by derived views.

Parameters ​

ParameterType
contextany
atIndex?number
parentIsLoaded?boolean

Returns ​

void

Inherited from ​

ts
ViewCommon._setupUI

_setValue() ​

ts
_setValue(property: any, value: any): never;

Defined in: ui/core/view/index.d.ts:1175

Obsolete: There is a new property system that does not rely on _setValue.

Parameters ​

ParameterType
propertyany
valueany

Returns ​

never

Overrides ​

ts
ViewCommon._setValue

_shouldDelayLayout() ​

ts
_shouldDelayLayout(): boolean;

Defined in: ui/core/view-base/index.ts

When returning true the callLoaded method will be run in setTimeout Method is intended to be overridden by inheritors and used as "protected"

Returns ​

boolean

Inherited from ​

ts
ViewCommon._shouldDelayLayout

_showNativeModalView() ​

ts
protected _showNativeModalView(parent: ViewCommon, options: ShowModalOptions): void;

Defined in: ui/core/view/view-common.ts

Parameters ​

ParameterType
parentViewCommon
optionsShowModalOptions

Returns ​

void

Inherited from ​

ts
ViewCommon._showNativeModalView

_suspendNativeUpdates() ​

ts
_suspendNativeUpdates(type: SuspendType): void;

Defined in: ui/core/view-base/index.ts

Parameters ​

ParameterType
typeSuspendType

Returns ​

void

Inherited from ​

ts
ViewCommon._suspendNativeUpdates

_tearDownUI() ​

ts
_tearDownUI(force?: boolean): void;

Defined in: ui/core/view-base/index.ts

Tears down the UI for ViewBase and all its children recursively. This method should not be overridden by derived views.

Parameters ​

ParameterType
force?boolean

Returns ​

void

Inherited from ​

ts
ViewCommon._tearDownUI

_updateStyleScope() ​

ts
_updateStyleScope(
   cssFileName?: string, 
   cssString?: string, 
   css?: string): void;

Defined in: ui/core/view/index.d.ts:1149

Updates styleScope or create new styleScope.

Parameters ​

ParameterTypeDescription
cssFileName?string-
cssString?string-
css?string-

Returns ​

void

Overrides ​

ts
ViewCommon._updateStyleScope

accessibilityAnnouncement() ​

ts
accessibilityAnnouncement(msg?: string): void;

Defined in: ui/core/view/index.d.ts:1022

Make an announcement to the screen reader.

Parameters ​

ParameterType
msg?string

Returns ​

void

Overrides ​

ts
ViewCommon.accessibilityAnnouncement

accessibilityScreenChanged() ​

ts
accessibilityScreenChanged(): void;

Defined in: ui/core/view/index.d.ts:1027

Announce screen changed

Returns ​

void

Overrides ​

ts
ViewCommon.accessibilityScreenChanged

addEventListener() ​

ts
addEventListener(
   eventNames: string, 
   callback: (data: EventData) => void, 
   thisArg?: any, 
   once?: boolean): void;

Defined in: ui/core/view/view-common.ts

Adds a listener for the specified event name.

Parameters ​

ParameterTypeDescription
eventNamesstring-
callback(data: EventData) => voidA function to be called when some of the specified event(s) is raised.
thisArg?anyAn optional parameter which when set will be used as "this" in callback method call.
once?booleanAn optional parameter which when set will cause the event listener to fire once.

Returns ​

void

Inherited from ​

ts
ViewCommon.addEventListener

addPseudoClass() ​

ts
protected addPseudoClass(name: string): void;

Defined in: ui/core/view-base/index.ts

Parameters ​

ParameterType
namestring

Returns ​

void

Unstable ​

A widget can call this method to add a matching css pseudo class.

Inherited from ​

ts
ViewCommon.addPseudoClass

animate() ​

ts
animate(options: AnimationDefinition): AnimationPromise;

Defined in: ui/core/view/index.d.ts:879

Animates one or more properties of the view based on the supplied options.

Parameters ​

ParameterType
optionsAnimationDefinition

Returns ​

AnimationPromise

Overrides ​

ts
ViewCommon.animate

bind() ​

ts
bind(options: BindingOptions, source?: Object): void;

Defined in: ui/core/view-base/index.ts

Parameters ​

ParameterType
optionsBindingOptions
source?Object

Returns ​

void

Inherited from ​

ts
ViewCommon.bind

callLoaded() ​

ts
callLoaded(): void;

Defined in: ui/core/view-base/index.ts

Returns ​

void

Inherited from ​

ts
ViewCommon.callLoaded

callUnloaded() ​

ts
callUnloaded(): void;

Defined in: ui/core/view-base/index.ts

Returns ​

void

Inherited from ​

ts
ViewCommon.callUnloaded

closeModal() ​

ts
closeModal(...args: any[]): void;

Defined in: ui/core/view/view-common.ts

Closes the current modal view that this page is showing.

Parameters ​

ParameterType
...argsany[]

Returns ​

void

Inherited from ​

ts
ViewCommon.closeModal

createAnimation() ​

ts
createAnimation(options: AnimationDefinition): Animation;

Defined in: ui/core/view/index.d.ts:884

Creates an Animation object based on the supplied options.

Parameters ​

ParameterType
optionsAnimationDefinition

Returns ​

Animation

Overrides ​

ts
ViewCommon.createAnimation

createNativeView() ​

ts
createNativeView(): Object;

Defined in: ui/core/view-base/index.ts

Creates a native view. Returns either android.view.View or UIView.

Returns ​

Object

Inherited from ​

ts
ViewCommon.createNativeView

deletePseudoClass() ​

ts
protected deletePseudoClass(name: string): void;

Defined in: ui/core/view-base/index.ts

Parameters ​

ParameterType
namestring

Returns ​

void

Unstable ​

A widget can call this method to discard matching css pseudo class.

Inherited from ​

ts
ViewCommon.deletePseudoClass

destroyNode() ​

ts
destroyNode(forceDestroyChildren?: boolean): void;

Defined in: ui/core/view-base/index.ts

Tears down the UI of a reusable node by making it no longer reusable.

Parameters ​

ParameterTypeDescription
forceDestroyChildren?booleanForce destroy the children (even if they are reusable)

Returns ​

void

See ​

_tearDownUI

Inherited from ​

ts
ViewCommon.destroyNode

disposeNativeView() ​

ts
disposeNativeView(): void;

Defined in: ui/core/view-base/index.ts

Clean up references to the native view.

Returns ​

void

Inherited from ​

ts
ViewCommon.disposeNativeView

eachChild() ​

ts
eachChild(callback: (child: ViewBase) => boolean): void;

Defined in: ui/core/view/view-common.ts

Iterates over children of type ViewBase.

Parameters ​

ParameterTypeDescription
callback(child: ViewBase) => booleanCalled for each child of type ViewBase. Iteration stops if this method returns falsy value.

Returns ​

void

Inherited from ​

ts
ViewCommon.eachChild

eachChildView() ​

ts
eachChildView(callback: (view: View) => boolean): void;

Defined in: ui/core/view/index.d.ts:1003

Iterates over children of type View.

Parameters ​

ParameterTypeDescription
callback(view: View) => booleanCalled for each child of type View. Iteration stops if this method returns falsy value.

Returns ​

void

Overrides ​

ts
ViewCommon.eachChildView

ensureDomNode() ​

ts
ensureDomNode(): void;

Defined in: ui/core/view-base/index.ts

Returns ​

void

Unstable ​

Ensures a dom-node for this view.

Inherited from ​

ts
ViewCommon.ensureDomNode

focus() ​

ts
focus(): boolean;

Defined in: ui/core/view/index.d.ts:813

Tries to focus the view. Returns a value indicating whether this view or one of its descendants actually took focus.

Returns ​

boolean

Overrides ​

ts
ViewCommon.focus

get() ​

ts
get(name: string): any;

Defined in: data/observable/index.ts

Gets the value of the specified property.

Parameters ​

ParameterType
namestring

Returns ​

any

Inherited from ​

ts
ViewCommon.get

getActualSize() ​

ts
getActualSize(): Size;

Defined in: ui/core/view/index.d.ts:909

Returns the actual size of the view in device-independent pixels.

Returns ​

Size

Overrides ​

ts
ViewCommon.getActualSize

getClosestWindow() ​

ts
getClosestWindow(): Window;

Defined in: ui/core/view/view-common.ts

(Android only) Gets closest window parent considering modals.

Returns ​

Window

Inherited from ​

ts
ViewCommon.getClosestWindow

getEffectivePaddingShorthand() ​

ts
getEffectivePaddingShorthand(): string;

Defined in: ui/core/view-base/index.ts

Returns ​

string

Inherited from ​

ts
ViewCommon.getEffectivePaddingShorthand

getGestureObservers() ​

ts
getGestureObservers(type: GestureTypes): GesturesObserver[];

Defined in: ui/core/view/index.d.ts:815

Parameters ​

ParameterType
typeGestureTypes

Returns ​

GesturesObserver[]

Overrides ​

ts
ViewCommon.getGestureObservers

getLocationInWindow() ​

ts
getLocationInWindow(): Point;

Defined in: ui/core/view/index.d.ts:894

Returns the location of this view in the window coordinate system.

Returns ​

Point

Overrides ​

ts
ViewCommon.getLocationInWindow

getLocationOnScreen() ​

ts
getLocationOnScreen(): Point;

Defined in: ui/core/view/index.d.ts:899

Returns the location of this view in the screen coordinate system.

Returns ​

Point

Overrides ​

ts
ViewCommon.getLocationOnScreen

getLocationRelativeTo() ​

ts
getLocationRelativeTo(otherView: View): Point;

Defined in: ui/core/view/index.d.ts:904

Returns the location of this view in the otherView's coordinate system.

Parameters ​

ParameterType
otherViewView

Returns ​

Point

Overrides ​

ts
ViewCommon.getLocationRelativeTo

getMeasuredHeight() ​

ts
getMeasuredHeight(): number;

Defined in: ui/core/view/index.d.ts:741

Returns the raw height component.

Returns ​

number

Overrides ​

ts
ViewCommon.getMeasuredHeight

getMeasuredState() ​

ts
getMeasuredState(): number;

Defined in: ui/core/view/index.d.ts:743

Returns ​

number

Overrides ​

ts
ViewCommon.getMeasuredState

getMeasuredWidth() ​

ts
getMeasuredWidth(): number;

Defined in: ui/core/view/index.d.ts:736

Returns the raw width component.

Returns ​

number

Overrides ​

ts
ViewCommon.getMeasuredWidth

getNativeWindow() ​

ts
getNativeWindow(): NativeWindow;

Defined in: ui/core/view/index.d.ts:980

The window currently hosting this view, or undefined when the view is not part of any window's view tree — including a view whose window has been closed.

Resolved on every call by walking up to the root view — through the presenting view of any modal on the way — so a view re-parented into another window's tree reports the window it moved to.

Returns ​

NativeWindow

Overrides ​

ts
ViewCommon.getNativeWindow

getSafeAreaInsets() ​

ts
getSafeAreaInsets(): Position;

Defined in: ui/core/view/index.d.ts:889

Returns the iOS safe area insets of this view.

Returns ​

Position

Overrides ​

ts
ViewCommon.getSafeAreaInsets

getViewByDomId() ​

ts
getViewByDomId<T>(domId: number): T;

Defined in: ui/core/view-base/index.ts

Returns the child view with the specified domId.

Type Parameters ​

Type Parameter
T extends ViewBase

Parameters ​

ParameterType
domIdnumber

Returns ​

T

Inherited from ​

ts
ViewCommon.getViewByDomId

getViewById() ​

ts
getViewById<T>(id: string): T;

Defined in: ui/core/view-base/index.ts

Returns the child view with the specified id.

Type Parameters ​

Type Parameter
T extends ViewBase

Parameters ​

ParameterType
idstring

Returns ​

T

Inherited from ​

ts
ViewCommon.getViewById

hasGestureObservers()? ​

ts
optional hasGestureObservers(): boolean;

Defined in: ui/core/view/index.d.ts:992

Android only check if gesture observers are attached

Returns ​

boolean


hasListeners() ​

ts
hasListeners(eventName: string): boolean;

Defined in: data/observable/index.ts

Checks whether a listener is registered for the specified event name.

Parameters ​

ParameterTypeDescription
eventNamestringThe name of the event to check for.

Returns ​

boolean

Inherited from ​

ts
ViewCommon.hasListeners

initNativeView() ​

ts
initNativeView(): void;

Defined in: ui/core/view-base/index.ts

Initializes properties/listeners of the native view.

Returns ​

void

Inherited from ​

ts
ViewCommon.initNativeView

layout() ​

ts
layout(
   left: number, 
   top: number, 
   right: number, 
   bottom: number, 
   setFrame?: boolean): void;

Defined in: ui/core/view/index.d.ts:731

Assign a size and position to a view and all of its descendants This is the second phase of the layout mechanism. (The first is measuring). In this phase, each parent calls layout on all of its children to position them. This is typically done using the child measurements that were stored in the measure pass(). Derived classes should not override this method. Derived classes with children should override onLayout. In that method, they should call layout on each of their children.

Parameters ​

ParameterType
leftnumber
topnumber
rightnumber
bottomnumber
setFrame?boolean

Returns ​

void

Overrides ​

ts
ViewCommon.layout

layoutNativeView() ​

ts
layoutNativeView(
   left: number, 
   top: number, 
   right: number, 
   bottom: number): void;

Defined in: ui/core/view/index.d.ts:776

Called from onLayout when native view position is about to be changed.

Parameters ​

ParameterTypeDescription
leftnumberLeft position, relative to parent
topnumberTop position, relative to parent
rightnumberRight position, relative to parent
bottomnumberBottom position, relative to parent

Returns ​

void

Overrides ​

ts
ViewCommon.layoutNativeView

loadView() ​

ts
loadView(view: ViewBase): void;

Defined in: ui/core/view-base/index.ts

Load view.

Parameters ​

ParameterTypeDescription
viewViewBaseto load.

Returns ​

void

Inherited from ​

ts
ViewCommon.loadView

measure() ​

ts
measure(widthMeasureSpec: number, heightMeasureSpec: number): void;

Defined in: ui/core/view/index.d.ts:720

This is called to find out how big a view should be. The parent supplies constraint information in the width and height parameters. The actual measurement work of a view is performed in onMeasure(int, int), called by this method. Therefore, only onMeasure(int, int) can and must be overridden by subclasses.

Parameters ​

ParameterTypeDescription
widthMeasureSpecnumberHorizontal space requirements as imposed by the parent
heightMeasureSpecnumberVertical space requirements as imposed by the parent

Returns ​

void

Overrides ​

ts
ViewCommon.measure

notify() ​

ts
notify<T>(data: T): void;

Defined in: data/observable/index.ts

Notify this Observable instance with some data. This causes all event handlers on the Observable instance to be called, as well as any 'global' event handlers set on the instance's class.

Type Parameters ​

Type Parameter
T extends Optional<EventData, "object">

Parameters ​

ParameterTypeDescription
dataTan object that satisfies the EventData interface, though with an optional 'object' property. If left undefined, the 'object' property will implicitly be set as this Observable instance.

Returns ​

void

Inherited from ​

ts
ViewCommon.notify

notifyPropertyChange() ​

ts
notifyPropertyChange(
   name: string, 
   value: any, 
   oldValue?: any): void;

Defined in: data/observable/index.ts

Notifies all the registered listeners for the property change event.

Parameters ​

ParameterType
namestring
valueany
oldValue?any

Returns ​

void

Inherited from ​

ts
ViewCommon.notifyPropertyChange

off() ​

ts
off(
   eventName: string, 
   callback?: (args: EventData) => void, 
   thisArg?: any): any;

Defined in: ui/core/view/index.d.ts:826

Removes the listener(s) for the specified event name.

Parameters ​

ParameterTypeDescription
eventNamestringThe name of the event.
callback?(args: EventData) => voidAn optional specific event listener to remove (if omitted, all event listeners by this name will be removed).
thisArg?anyAn optional parameter which, when set, will be used to refine search of the correct event listener to be removed.

Returns ​

any

Overrides ​

ts
ViewCommon.off

on() ​

Call Signature ​

ts
on(
   eventName: string, 
   callback: (args: EventData) => void, 
   thisArg?: any): any;

Defined in: ui/core/view/index.d.ts:838

Adds a listener for the specified event name.

Parameters ​
ParameterTypeDescription
eventNamestringThe name of the event.
callback(args: EventData) => voidThe event listener to add. Will be called when an event of the given name is raised.
thisArg?anyAn optional parameter which, when set, will be bound as the this context when the callback is called. Falsy values will be not be bound.
Returns ​

any

Overrides ​
ts
ViewCommon.on

Call Signature ​

ts
on(
   event: "loaded", 
   callback: (args: EventData) => void, 
   thisArg?: any): any;

Defined in: ui/core/view/index.d.ts:843

Raised when a loaded event occurs.

Parameters ​
ParameterType
event"loaded"
callback(args: EventData) => void
thisArg?any
Returns ​

any

Overrides ​
ts
ViewCommon.on

Call Signature ​

ts
on(
   event: "unloaded", 
   callback: (args: EventData) => void, 
   thisArg?: any): any;

Defined in: ui/core/view/index.d.ts:848

Raised when an unloaded event occurs.

Parameters ​
ParameterType
event"unloaded"
callback(args: EventData) => void
thisArg?any
Returns ​

any

Overrides ​
ts
ViewCommon.on

Call Signature ​

ts
on(
   event: "androidBackPressed", 
   callback: (args: EventData) => void, 
   thisArg?: any): any;

Defined in: ui/core/view/index.d.ts:854

Raised when a back button is pressed. This event is raised only for android.

Parameters ​
ParameterType
event"androidBackPressed"
callback(args: EventData) => void
thisArg?any
Returns ​

any

Overrides ​
ts
ViewCommon.on

Call Signature ​

ts
on(
   event: "showingModally", 
   callback: (args: ShownModallyData) => void, 
   thisArg?: any): void;

Defined in: ui/core/view/index.d.ts:859

Raised before the view is shown as a modal dialog.

Parameters ​
ParameterType
event"showingModally"
callback(args: ShownModallyData) => void
thisArg?any
Returns ​

void

Overrides ​
ts
ViewCommon.on

Call Signature ​

ts
on(
   event: "shownModally", 
   callback: (args: ShownModallyData) => void, 
   thisArg?: any): any;

Defined in: ui/core/view/index.d.ts:864

Raised after the view is shown as a modal dialog.

Parameters ​
ParameterType
event"shownModally"
callback(args: ShownModallyData) => void
thisArg?any
Returns ​

any

Overrides ​
ts
ViewCommon.on

Call Signature ​

ts
on(
   event: "androidOverflowInset", 
   callback: (args: ShownModallyData) => void, 
   thisArg?: any): any;

Defined in: ui/core/view/index.d.ts:869

Raised after the view is shown as a modal dialog.

Parameters ​
ParameterType
event"androidOverflowInset"
callback(args: ShownModallyData) => void
thisArg?any
Returns ​

any

Overrides ​
ts
ViewCommon.on

onBackPressed() ​

ts
onBackPressed(): boolean;

Defined in: ui/core/view/index.d.ts:914

Derived classes can override this method to handle Android back button press.

Returns ​

boolean

Overrides ​

ts
ViewCommon.onBackPressed

once() ​

ts
once(
   eventName: string, 
   callback: (data: EventData) => void, 
   thisArg?: any): void;

Defined in: data/observable/index.ts

Adds a listener for the specified event name, which, once fired, will remove itself.

Parameters ​

ParameterTypeDescription
eventNamestringThe name of the event.
callback(data: EventData) => voidThe event listener to add. Will be called when an event of the given name is raised.
thisArg?anyAn optional parameter which, when set, will be bound as the this context when the callback is called. Falsy values will be not be bound.

Returns ​

void

Inherited from ​

ts
ViewCommon.once

onLayout() ​

ts
onLayout(
   left: number, 
   top: number, 
   right: number, 
   bottom: number): void;

Defined in: ui/core/view/index.d.ts:760

Called from layout when this view should assign a size and position to each of its children. Derived classes with children should override this method and call layout on each of their children.

Parameters ​

ParameterTypeDescription
leftnumberLeft position, relative to parent
topnumberTop position, relative to parent
rightnumberRight position, relative to parent
bottomnumberBottom position, relative to parent

Returns ​

void

Overrides ​

ts
ViewCommon.onLayout

onLoaded() ​

ts
onLoaded(): void;

Defined in: ui/core/view/view-common.ts

Returns ​

void

Inherited from ​

ts
ViewCommon.onLoaded

onMeasure() ​

ts
onMeasure(widthMeasureSpec: number, heightMeasureSpec: number): void;

Defined in: ui/core/view/index.d.ts:751

Measure the view and its content to determine the measured width and the measured height. This method is invoked by measure(int, int) and should be overriden by subclasses to provide accurate and efficient measurement of their contents. When overriding this method, you must call setMeasuredDimension(int, int) to store the measured width and height of this view. Failure to do so will trigger an exception, thrown by measure(int, int).

Parameters ​

ParameterTypeDescription
widthMeasureSpecnumberhorizontal space requirements as imposed by the parent. The requirements are encoded with View.MeasureSpec.
heightMeasureSpecnumbervertical space requirements as imposed by the parent. The requirements are encoded with View.MeasureSpec.

Returns ​

void

Overrides ​

ts
ViewCommon.onMeasure

onResumeNativeUpdates() ​

ts
onResumeNativeUpdates(): void;

Defined in: ui/core/view-base/index.ts

Returns ​

void

Inherited from ​

ts
ViewCommon.onResumeNativeUpdates

onUnloaded() ​

ts
onUnloaded(): void;

Defined in: ui/core/view-base/index.ts

Returns ​

void

Inherited from ​

ts
ViewCommon.onUnloaded

removeEventListener() ​

ts
removeEventListener(
   eventNames: string, 
   callback?: (data: EventData) => void, 
   thisArg?: any): void;

Defined in: ui/core/view/view-common.ts

Removes listener(s) for the specified event name.

Parameters ​

ParameterTypeDescription
eventNamesstring-
callback?(data: EventData) => voidAn optional parameter pointing to a specific listener. If not defined, all listeners for the event names will be removed.
thisArg?anyAn optional parameter which when set will be used to refine search of the correct callback which will be removed as event listener.

Returns ​

void

Inherited from ​

ts
ViewCommon.removeEventListener

requestLayout() ​

ts
requestLayout(): void;

Defined in: ui/core/view-base/index.ts

Invalidates the layout of the view and triggers a new layout pass.

Returns ​

void

Inherited from ​

ts
ViewCommon.requestLayout

resetNativeView() ​

ts
resetNativeView(): void;

Defined in: ui/core/view/view-common.ts

Resets properties/listeners set to the native view.

Returns ​

void

Inherited from ​

ts
ViewCommon.resetNativeView

sendAccessibilityEvent() ​

ts
sendAccessibilityEvent(options: AccessibilityEventOptions): void;

Defined in: ui/core/view/index.d.ts:1017

Send accessibility event

Parameters ​

ParameterType
optionsAccessibilityEventOptions

Returns ​

void

Params ​

options AccessibilityEventOptions androidAccessibilityEvent: AndroidAccessibilityEvent; iosNotificationType: IOSPostAccessibilityNotificationType; message: string;

iOS Notes: type = 'announcement' will announce args via VoiceOver. If no args element will be announced instead. type = 'layout' used when the layout of a screen changes. type = 'screen' large change made to the screen.

Overrides ​

ts
ViewCommon.sendAccessibilityEvent

set() ​

ts
set(name: string, value: any): void;

Defined in: ui/core/view-base/index.ts

Updates the specified property with the provided value.

Parameters ​

ParameterType
namestring
valueany

Returns ​

void

Inherited from ​

ts
ViewCommon.set

setAccessibilityIdentifier() ​

ts
setAccessibilityIdentifier(view: any, value: string): void;

Defined in: ui/core/view/view-common.ts

Parameters ​

ParameterType
viewany
valuestring

Returns ​

void

Inherited from ​

ts
ViewCommon.setAccessibilityIdentifier

setInlineStyle() ​

ts
setInlineStyle(style: string): void;

Defined in: ui/core/view-base/index.ts

Parameters ​

ParameterType
stylestring

Returns ​

void

Inherited from ​

ts
ViewCommon.setInlineStyle

setMeasuredDimension() ​

ts
setMeasuredDimension(measuredWidth: number, measuredHeight: number): void;

Defined in: ui/core/view/index.d.ts:767

This method must be called by onMeasure(int, int) to store the measured width and measured height. Failing to do so will trigger an exception at measurement time.

Parameters ​

ParameterTypeDescription
measuredWidthnumberThe measured width of this view. May be a complex bit mask as defined by MEASURED_SIZE_MASK and MEASURED_STATE_TOO_SMALL.
measuredHeightnumberThe measured height of this view. May be a complex bit mask as defined by MEASURED_SIZE_MASK and MEASURED_STATE_TOO_SMALL.

Returns ​

void

Overrides ​

ts
ViewCommon.setMeasuredDimension

setNativeView() ​

ts
setNativeView(value: any): void;

Defined in: ui/core/view-base/index.ts

Set the nativeView field performing extra checks and updates to the native properties on the new view. Use in cases where the createNativeView is not suitable. As an example use in item controls where the native parent view will create the native views for child items.

Parameters ​

ParameterType
valueany

Returns ​

void

Inherited from ​

ts
ViewCommon.setNativeView

setOnTouchListener()? ​

ts
optional setOnTouchListener(): void;

Defined in: ui/core/view/index.d.ts:997

Android only to set the touch listener

Returns ​

void


setProperty() ​

ts
setProperty(name: string, value: any): void;

Defined in: data/observable/index.ts

Updates the specified property with the provided value and raises a property change event and a specific change event based on the property name.

Parameters ​

ParameterType
namestring
valueany

Returns ​

void

Inherited from ​

ts
ViewCommon.setProperty

showModal() ​

ts
showModal(...args: any[]): View;

Defined in: ui/core/view/view-common.ts

Shows the view passed as parameter as a modal view.

Parameters ​

ParameterType
...argsany[]

Returns ​

View

Inherited from ​

ts
ViewCommon.showModal

toString() ​

ts
toString(): string;

Defined in: ui/core/view-base/index.ts

Returns a string representation of an object.

Returns ​

string

Inherited from ​

ts
ViewCommon.toString

unbind() ​

ts
unbind(property: string): void;

Defined in: ui/core/view-base/index.ts

Parameters ​

ParameterType
propertystring

Returns ​

void

Inherited from ​

ts
ViewCommon.unbind

unloadView() ​

ts
unloadView(view: ViewBase): void;

Defined in: ui/core/view-base/index.ts

Unload view.

Parameters ​

ParameterTypeDescription
viewViewBaseto unload.

Returns ​

void

Inherited from ​

ts
ViewCommon.unloadView

updateStatusBarStyle() ​

ts
updateStatusBarStyle(value: "dark" | "light"): void;

Defined in: ui/core/view/view-common.ts

Parameters ​

ParameterType
value"dark" | "light"

Returns ​

void

Inherited from ​

ts
ViewCommon.updateStatusBarStyle

addEventListener() ​

ts
static addEventListener(
   eventName: string, 
   callback: (data: EventData) => void, 
   thisArg?: any, 
   once?: boolean): void;

Defined in: data/observable/index.ts

Please avoid using the static event-handling APIs as they will be removed in future.

Parameters ​

ParameterType
eventNamestring
callback(data: EventData) => void
thisArg?any
once?boolean

Returns ​

void

Deprecated ​

Inherited from ​

ts
ViewCommon.addEventListener

combineMeasuredStates() ​

ts
static combineMeasuredStates(curState: number, newState: any): number;

Defined in: ui/core/view/index.d.ts:807

Parameters ​

ParameterType
curStatenumber
newStateany

Returns ​

number

Overrides ​

ts
ViewCommon.combineMeasuredStates

layoutChild() ​

ts
static layoutChild(
   parent: View, 
   child: View, 
   left: number, 
   top: number, 
   right: number, 
   bottom: number): void;

Defined in: ui/core/view/index.d.ts:795

Layout a child by taking into account its margins, horizontal and vertical alignments and a given bounds.

Parameters ​

ParameterTypeDescription
parentViewThis parameter is not used. You can pass null.
childView-
leftnumberLeft position, relative to parent
topnumberTop position, relative to parent
rightnumberRight position, relative to parent
bottomnumberBottom position, relative to parent

Returns ​

void

Overrides ​

ts
ViewCommon.layoutChild

measureChild() ​

ts
static measureChild(
   parent: View, 
   child: View, 
   widthMeasureSpec: number, 
   heightMeasureSpec: number): {
  measuredHeight: number;
  measuredWidth: number;
};

Defined in: ui/core/view/index.d.ts:785

Measure a child by taking into account its margins and a given measureSpecs.

Parameters ​

ParameterTypeDescription
parentViewThis parameter is not used. You can pass null.
childViewThe view to be measured.
widthMeasureSpecnumber-
heightMeasureSpecnumber-

Returns ​

ts
{
  measuredHeight: number;
  measuredWidth: number;
}
measuredHeight ​
ts
measuredHeight: number;
measuredWidth ​
ts
measuredWidth: number;

Overrides ​

ts
ViewCommon.measureChild

off() ​

ts
static off(
   eventName: string, 
   callback?: (data: EventData) => void, 
   thisArg?: any): void;

Defined in: data/observable/index.ts

Please avoid using the static event-handling APIs as they will be removed in future.

Parameters ​

ParameterType
eventNamestring
callback?(data: EventData) => void
thisArg?any

Returns ​

void

Deprecated ​

Inherited from ​

ts
ViewCommon.off

on() ​

ts
static on(
   eventName: string, 
   callback: (data: EventData) => void, 
   thisArg?: any, 
   once?: boolean): void;

Defined in: data/observable/index.ts

Please avoid using the static event-handling APIs as they will be removed in future.

Parameters ​

ParameterType
eventNamestring
callback(data: EventData) => void
thisArg?any
once?boolean

Returns ​

void

Deprecated ​

Inherited from ​

ts
ViewCommon.on

once() ​

ts
static once(
   eventName: string, 
   callback: (data: EventData) => void, 
   thisArg?: any): void;

Defined in: data/observable/index.ts

Please avoid using the static event-handling APIs as they will be removed in future.

Parameters ​

ParameterType
eventNamestring
callback(data: EventData) => void
thisArg?any

Returns ​

void

Deprecated ​

Inherited from ​

ts
ViewCommon.once

removeEventListener() ​

ts
static removeEventListener(
   eventName: string, 
   callback?: (data: EventData) => void, 
   thisArg?: any): void;

Defined in: data/observable/index.ts

Please avoid using the static event-handling APIs as they will be removed in future.

Parameters ​

ParameterType
eventNamestring
callback?(data: EventData) => void
thisArg?any

Returns ​

void

Deprecated ​

Inherited from ​

ts
ViewCommon.removeEventListener

resolveSizeAndState() ​

ts
static resolveSizeAndState(
   size: number, 
   specSize: number, 
   specMode: number, 
   childMeasuredState: number): number;

Defined in: ui/core/view/index.d.ts:805

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.

Parameters ​

ParameterType
sizenumber
specSizenumber
specModenumber
childMeasuredStatenumber

Returns ​

number

Overrides ​

ts
ViewCommon.resolveSizeAndState
Previous
Transition