@nativescript/core
- Version 8.2.3
- Published
- 8.68 MB
- 5 dependencies
- Apache-2.0 license
Install
npm i @nativescript/core
yarn add @nativescript/core
pnpm add @nativescript/core
Overview
A JavaScript library providing an easy to use api for interacting with iOS and Android platform APIs.
Index
Variables
- AccessibilityEvents
- androidDynamicElevationOffsetProperty
- androidElevationProperty
- AnimationCurve
- Application
- ApplicationSettings
- autocapitalizationTypeProperty
- autocorrectProperty
- backgroundColorProperty
- backgroundImageProperty
- backgroundInternalProperty
- backgroundPositionProperty
- backgroundProperty
- backgroundRepeatProperty
- backgroundSizeProperty
- borderBottomColorProperty
- borderBottomLeftRadiusProperty
- borderBottomRightRadiusProperty
- borderBottomWidthProperty
- borderColorProperty
- borderLeftColorProperty
- borderLeftWidthProperty
- borderRadiusProperty
- borderRightColorProperty
- borderRightWidthProperty
- borderTopColorProperty
- borderTopLeftRadiusProperty
- borderTopRightRadiusProperty
- borderTopWidthProperty
- borderWidthProperty
- clipPathProperty
- colorProperty
- Connectivity
- CSSHelper
- Device
- Dialogs
- editableProperty
- Enums
- fontFamilyProperty
- fontInternalProperty
- fontSizeProperty
- fontStyleProperty
- fontWeightProperty
- heightProperty
- hintProperty
- horizontalAlignmentProperty
- Http
- isAndroid
- isIOS
- isUserInteractionEnabledProperty
- keyboardTypeProperty
- letterSpacingProperty
- lineHeightProperty
- marginBottomProperty
- marginLeftProperty
- marginProperty
- marginRightProperty
- marginTopProperty
- maxLengthProperty
- minHeightProperty
- minWidthProperty
- opacityProperty
- paddingBottomProperty
- paddingLeftProperty
- paddingProperty
- paddingRightProperty
- paddingTopProperty
- placeholderColorProperty
- platformNames
- returnKeyTypeProperty
- rotateProperty
- scaleXProperty
- scaleYProperty
- textAlignmentProperty
- textDecorationProperty
- textShadowProperty
- textTransformProperty
- translateXProperty
- translateYProperty
- unsetValue
- updateTextTriggerProperty
- Utils
- verticalAlignmentProperty
- visibilityProperty
- whiteSpaceProperty
- widthProperty
- zeroLength
- zIndexProperty
Functions
- action()
- addTaggedAdditionalCSS()
- addWeakEventListener()
- alert()
- animationTimingFunctionConverter()
- booleanConverter()
- confirm()
- CSSType()
- eachDescendant()
- fromObject()
- fromObjectRecursive()
- getAncestor()
- getCurrentPage()
- getFileAccess()
- getRootLayout()
- getTransformedText()
- getViewById()
- login()
- makeParser()
- makeValidator()
- parseCSSShadow()
- parseKeyframeDeclarations()
- profile()
- profilingDisable()
- profilingDumpProfiles()
- profilingEnable()
- profilingIsRunning()
- profilingResetProfiles()
- profilingStart()
- profilingStartCPU()
- profilingStop()
- profilingStopCPU()
- profilingTime()
- profilingUptime()
- prompt()
- PseudoClassHandler()
- removeTaggedAdditionalCSS()
- removeWeakEventListener()
- resolveFileNameFromUrl()
- sanitizeModuleName()
- setActivityCallbacks()
- timeConverter()
- transformConverter()
Classes
AndroidApplication
- activityBackPressedEvent
- activityCreatedEvent
- activityDestroyedEvent
- activityNewIntentEvent
- activityPausedEvent
- activityRequestPermissionsEvent
- activityResultEvent
- activityResumedEvent
- activityStartedEvent
- activityStoppedEvent
- backgrounded
- context
- foregroundActivity
- getRegisteredBroadcastReceiver()
- init
- nativeApp
- on()
- orientation
- packageName
- paused
- registerBroadcastReceiver()
- saveActivityStateEvent
- startActivity
- systemAppearance
- unregisterBroadcastReceiver()
Background
- borderBottomColor
- borderBottomLeftRadius
- borderBottomRightRadius
- borderBottomWidth
- borderLeftColor
- borderLeftWidth
- borderRightColor
- borderRightWidth
- borderTopColor
- borderTopLeftRadius
- borderTopRightRadius
- borderTopWidth
- boxShadow
- clearFlags
- clipPath
- color
- default
- equals()
- getBoxShadow()
- getUniformBorderColor()
- getUniformBorderRadius()
- getUniformBorderWidth()
- hasBorderColor()
- hasBorderRadius()
- hasBorderWidth()
- hasBoxShadow()
- hasUniformBorder()
- hasUniformBorderColor()
- hasUniformBorderRadius()
- hasUniformBorderWidth()
- image
- isEmpty()
- position
- repeat
- size
- toString()
- withBorderBottomColor()
- withBorderBottomLeftRadius()
- withBorderBottomRightRadius()
- withBorderBottomWidth()
- withBorderLeftColor()
- withBorderLeftWidth()
- withBorderRightColor()
- withBorderRightWidth()
- withBorderTopColor()
- withBorderTopLeftRadius()
- withBorderTopRightRadius()
- withBorderTopWidth()
- withBoxShadow()
- withClipPath()
- withColor()
- withImage()
- withPosition()
- withRepeat()
- withSize()
ImageSource
- android
- fromAsset()
- fromBase64()
- fromBase64Sync()
- fromData()
- fromDataSync()
- fromFile()
- fromFileOrResourceSync()
- fromFileSync()
- fromFontIconCodeSync()
- fromResource()
- fromResourceSync()
- fromUrl()
- height
- ios
- loadFromBase64()
- loadFromData()
- loadFromFile()
- loadFromFontIconCode()
- loadFromResource()
- resize()
- resizeAsync()
- rotationAngle
- saveToFile()
- saveToFileAsync()
- setNativeSource()
- toBase64String()
- toBase64StringAsync()
- width
Page
- accessibilityAnnouncePageEnabled
- accessibilityScreenChanged()
- actionBar
- actionBarHidden
- androidStatusBarBackground
- backgroundSpanUnderStatusBar
- enableSwipeBackNavigation
- frame
- getKeyframeAnimationWithName()
- hasActionBar
- navigatedFromEvent
- navigatedToEvent
- navigatingFromEvent
- navigatingToEvent
- navigationContext
- on()
- onAccessibilityPerformEscape
- onNavigatedFrom()
- onNavigatedTo()
- onNavigatingFrom()
- onNavigatingTo()
- statusBarStyle
PageBase
- actionBar
- actionBarHidden
- androidStatusBarBackground
- backgroundSpanUnderStatusBar
- createNavigatedData()
- eachChildView()
- enableSwipeBackNavigation
- frame
- getKeyframeAnimationWithName()
- hasActionBar
- navigatedFromEvent
- navigatedToEvent
- navigatingFromEvent
- navigatingToEvent
- navigationContext
- onNavigatedFrom()
- onNavigatedTo()
- onNavigatingFrom()
- onNavigatingTo()
- page
- statusBarStyle
Style
- accessibilityHidden
- accessibilityLanguage
- accessibilityLiveRegion
- accessibilityMediaSession
- accessibilityRole
- accessibilityState
- accessibilityStep
- accessible
- alignContent
- alignItems
- alignSelf
- androidContentInset
- androidContentInsetLeft
- androidContentInsetRight
- androidDynamicElevationOffset
- androidElevation
- androidSelectedTabHighlightColor
- androidStatusBarBackground
- background
- backgroundColor
- backgroundImage
- backgroundInternal
- backgroundPosition
- backgroundRepeat
- backgroundSize
- borderBottomColor
- borderBottomLeftRadius
- borderBottomRightRadius
- borderBottomWidth
- borderColor
- borderLeftColor
- borderLeftWidth
- borderRadius
- borderRightColor
- borderRightWidth
- borderTopColor
- borderTopLeftRadius
- borderTopRightRadius
- borderTopWidth
- borderWidth
- boxShadow
- clipPath
- color
- flexDirection
- flexGrow
- flexShrink
- flexWrap
- flexWrapBefore
- font
- fontFamily
- fontInternal
- fontSize
- fontStyle
- fontWeight
- getCssVariable()
- height
- horizontalAlignment
- justifyContent
- letterSpacing
- lineHeight
- margin
- marginBottom
- marginLeft
- marginRight
- marginTop
- minHeight
- minWidth
- opacity
- order
- padding
- paddingBottom
- paddingLeft
- paddingRight
- paddingTop
- perspective
- placeholderColor
- PropertyBag
- resetScopedCssVariables()
- resetUnscopedCssVariables()
- rotate
- rotateX
- rotateY
- scaleX
- scaleY
- selectedBackgroundColor
- selectedTabTextColor
- separatorColor
- setScopedCssVariable()
- setUnscopedCssVariable()
- statusBarStyle
- tabBackgroundColor
- tabTextColor
- tabTextFontSize
- textAlignment
- textDecoration
- textShadow
- textTransform
- tintColor
- toString()
- translateX
- translateY
- verticalAlignment
- view
- viewRef
- visibility
- whiteSpace
- width
- zIndex
View
- accessibilityAnnouncement()
- accessibilityBlurEvent
- accessibilityFocusChangedEvent
- accessibilityFocusEvent
- accessibilityHidden
- accessibilityHint
- accessibilityIdentifier
- accessibilityLabel
- accessibilityLanguage
- accessibilityLiveRegion
- accessibilityMediaSession
- accessibilityRole
- accessibilityScreenChanged()
- accessibilityState
- accessibilityValue
- accessible
- addCss()
- addCssFile()
- android
- androidDynamicElevationOffset
- androidElevation
- animate()
- automationText
- background
- backgroundColor
- backgroundImage
- bindingContext
- borderBottomColor
- borderBottomLeftRadius
- borderBottomRightRadius
- borderBottomWidth
- borderColor
- borderLeftColor
- borderLeftWidth
- borderRadius
- borderRightColor
- borderRightWidth
- borderTopColor
- borderTopLeftRadius
- borderTopRightRadius
- borderTopWidth
- borderWidth
- boxShadow
- changeCssFile()
- color
- combineMeasuredStates()
- createAnimation()
- css
- cssClasses
- cssPseudoClasses
- cssType
- eachChildView()
- focus()
- getActualSize()
- getGestureObservers()
- getLocationInWindow()
- getLocationOnScreen()
- getLocationRelativeTo()
- getMeasuredHeight()
- getMeasuredState()
- getMeasuredWidth()
- getSafeAreaInsets()
- hasGestureObservers()
- height
- horizontalAlignment
- ios
- iosIgnoreSafeArea
- iosOverflowSafeArea
- iosOverflowSafeAreaEnabled
- isEnabled
- isLayoutRequired
- isLayoutValid
- isUserInteractionEnabled
- layout()
- layoutChangedEvent
- layoutChild()
- layoutNativeView()
- margin
- marginBottom
- marginLeft
- marginRight
- marginTop
- measure()
- measureChild()
- minHeight
- minWidth
- modal
- off()
- on()
- onBackPressed()
- onLayout()
- onMeasure()
- opacity
- originX
- originY
- perspective
- resolveSizeAndState()
- rotate
- rotateX
- rotateY
- scaleX
- scaleY
- sendAccessibilityEvent()
- setMeasuredDimension()
- setOnTouchListener()
- showingModallyEvent
- shownModallyEvent
- translateX
- translateY
- verticalAlignment
- visibility
- width
ViewBase
- addPseudoClass()
- alignSelf
- android
- bind()
- bindingContext
- callLoaded()
- callUnloaded()
- className
- closeModal()
- col
- colSpan
- column
- columnSpan
- createdEvent
- createNativeView()
- cssClasses
- cssPseudoClasses
- deletePseudoClass()
- destroyNode()
- disposeNativeView()
- disposeNativeViewEvent
- dock
- domNode
- eachChild()
- effectiveBorderBottomWidth
- effectiveBorderLeftWidth
- effectiveBorderRightWidth
- effectiveBorderTopWidth
- effectiveHeight
- effectiveLeft
- effectiveMarginBottom
- effectiveMarginLeft
- effectiveMarginRight
- effectiveMarginTop
- effectiveMinHeight
- effectiveMinWidth
- effectivePaddingBottom
- effectivePaddingLeft
- effectivePaddingRight
- effectivePaddingTop
- effectiveTop
- effectiveWidth
- ensureDomNode()
- flexGrow
- flexShrink
- flexWrapBefore
- getViewByDomId()
- getViewById()
- id
- initNativeView()
- ios
- isCollapsed
- isLoaded
- left
- loadedEvent
- loadView()
- nativeView
- nativeViewProtected
- onLoaded()
- onResumeNativeUpdates()
- onUnloaded()
- order
- page
- parent
- parentNode
- recycleNativeView
- requestLayout()
- resetNativeView()
- reusable
- row
- rowSpan
- setInlineStyle()
- setNativeView()
- showModal()
- style
- top
- typeName
- unbind()
- unloadedEvent
- unloadView()
- viewController
Interfaces
Enums
Type Aliases
Namespaces
CoreTypes
- AutocapitalizationInputType
- BackgroundRepeatType
- DeviceOrientationType
- dip
- DockType
- HorizontalAlignmentType
- ImageStretchType
- KeyboardInputType
- LengthDipUnit
- LengthPercentUnit
- LengthPxUnit
- LengthType
- OrientationType
- percent
- PercentLengthType
- px
- ReturnKeyButtonType
- TextAlignmentType
- TextDecorationType
- TextTransformType
- UpdateTextTriggerType
- VerticalAlignmentTextType
- VerticalAlignmentType
- VisibilityType
- WhiteSpaceType
IOSHelper
- expandBeyondSafeArea()
- getFrameFromPosition()
- getParentWithViewController()
- getPositionFromFrame()
- layoutView()
- shrinkToSafeArea()
- traitCollectionColorAppearanceChangedEvent
- UIAdaptivePresentationControllerDelegateImp
- UILayoutViewController
- UIPopoverPresentationControllerDelegateImp
- updateAutoAdjustScrollInsets()
- updateConstraints()
Variables
variable AccessibilityEvents
const AccessibilityEvents: { accessibilityBlurEvent: string; accessibilityFocusEvent: string; accessibilityFocusChangedEvent: string;};
variable androidDynamicElevationOffsetProperty
const androidDynamicElevationOffsetProperty: CssProperty<Style, number>;
variable androidElevationProperty
const androidElevationProperty: CssProperty<Style, number>;
variable AnimationCurve
const AnimationCurve: typeof CoreTypes.AnimationCurve;
Deprecated
Use
CoreTypes.AnimationCurve
instead.
variable Application
const Application: { launchEvent: string; displayedEvent: string; uncaughtErrorEvent: string; discardedErrorEvent: string; suspendEvent: string; resumeEvent: string; exitEvent: string; lowMemoryEvent: string; orientationChangedEvent: string; systemAppearanceChangedEvent: string; fontScaleChangedEvent: string; systemAppearanceChanged: typeof systemAppearanceChanged; setMaxRefreshRate: typeof setMaxRefreshRate; getMainEntry: typeof getMainEntry; getRootView: typeof getRootView; resetRootView: typeof _resetRootView; getResources: typeof getResources; setResources: typeof setResources; setCssFileName: typeof setCssFileName; getCssFileName: typeof getCssFileName; loadAppCss: typeof loadAppCss; addCss: typeof addCss; on: typeof on; off: typeof off; notify: typeof notify; hasListeners: typeof hasListeners; run: typeof run; orientation: typeof orientation; getNativeApplication: typeof getNativeApplication; hasLaunched: typeof hasLaunched; systemAppearance: typeof systemAppearance; setAutoSystemAppearanceChanged: typeof setAutoSystemAppearanceChanged; android: AndroidApplication; ios: iOSApplication;};
variable ApplicationSettings
const ApplicationSettings: { clear: typeof clear; flush: typeof flush; hasKey: typeof hasKey; remove: typeof remove; setString: typeof setString; getString: typeof getString; getAllKeys: typeof getAllKeys; getBoolean: typeof getBoolean; setBoolean: typeof setBoolean; getNumber: typeof getNumber; setNumber: typeof setNumber;};
variable autocapitalizationTypeProperty
const autocapitalizationTypeProperty: Property< EditableTextBase, CoreTypes.AutocapitalizationInputType>;
variable autocorrectProperty
const autocorrectProperty: Property<EditableTextBase, boolean>;
variable backgroundColorProperty
const backgroundColorProperty: CssAnimationProperty<Style, Color>;
variable backgroundImageProperty
const backgroundImageProperty: CssProperty<Style, string>;
variable backgroundInternalProperty
const backgroundInternalProperty: CssProperty<Style, Background>;
variable backgroundPositionProperty
const backgroundPositionProperty: CssProperty<Style, string>;
variable backgroundProperty
const backgroundProperty: ShorthandProperty<Style, string>;
variable backgroundRepeatProperty
const backgroundRepeatProperty: CssProperty<Style, CoreTypes.BackgroundRepeatType>;
variable backgroundSizeProperty
const backgroundSizeProperty: CssProperty<Style, string>;
variable borderBottomColorProperty
const borderBottomColorProperty: CssProperty<Style, Color>;
variable borderBottomLeftRadiusProperty
const borderBottomLeftRadiusProperty: CssProperty<Style, CoreTypes.LengthType>;
variable borderBottomRightRadiusProperty
const borderBottomRightRadiusProperty: CssProperty<Style, CoreTypes.LengthType>;
variable borderBottomWidthProperty
const borderBottomWidthProperty: CssProperty<Style, CoreTypes.LengthType>;
variable borderColorProperty
const borderColorProperty: ShorthandProperty<Style, string | Color>;
variable borderLeftColorProperty
const borderLeftColorProperty: CssProperty<Style, Color>;
variable borderLeftWidthProperty
const borderLeftWidthProperty: CssProperty<Style, CoreTypes.LengthType>;
variable borderRadiusProperty
const borderRadiusProperty: ShorthandProperty< Style, string | number | CoreTypes.LengthDipUnit | CoreTypes.LengthPxUnit>;
variable borderRightColorProperty
const borderRightColorProperty: CssProperty<Style, Color>;
variable borderRightWidthProperty
const borderRightWidthProperty: CssProperty<Style, CoreTypes.LengthType>;
variable borderTopColorProperty
const borderTopColorProperty: CssProperty<Style, Color>;
variable borderTopLeftRadiusProperty
const borderTopLeftRadiusProperty: CssProperty<Style, CoreTypes.LengthType>;
variable borderTopRightRadiusProperty
const borderTopRightRadiusProperty: CssProperty<Style, CoreTypes.LengthType>;
variable borderTopWidthProperty
const borderTopWidthProperty: CssProperty<Style, CoreTypes.LengthType>;
variable borderWidthProperty
const borderWidthProperty: ShorthandProperty< Style, string | number | CoreTypes.LengthDipUnit | CoreTypes.LengthPxUnit>;
variable clipPathProperty
const clipPathProperty: CssProperty<Style, string>;
variable colorProperty
const colorProperty: InheritedCssProperty<Style, Color>;
variable Connectivity
const Connectivity: { connectionType: typeof connectionType; getConnectionType: typeof getConnectionType; startMonitoring: typeof startMonitoring; stopMonitoring: typeof stopMonitoring;};
variable CSSHelper
const CSSHelper: { createSelector: typeof createSelector; SelectorCore: typeof SelectorCore; SimpleSelector: typeof SimpleSelector; InvalidSelector: typeof InvalidSelector; UniversalSelector: typeof UniversalSelector; TypeSelector: typeof TypeSelector; ClassSelector: typeof ClassSelector; AttributeSelector: typeof AttributeSelector; PseudoClassSelector: typeof PseudoClassSelector; SimpleSelectorSequence: typeof SimpleSelectorSequence; Selector: typeof Selector; RuleSet: typeof RuleSet; SelectorsMap: typeof SelectorsMap; fromAstNodes: typeof fromAstNodes; SelectorsMatch: typeof SelectorsMatch;};
variable Device
const Device: IDevice;
Gets the current device information.
variable Dialogs
const Dialogs: { alert: typeof alert; confirm: typeof confirm; prompt: typeof prompt; login: typeof login; action: typeof action;};
Singular rollup for convenience of all dialog methods
variable editableProperty
const editableProperty: Property<EditableTextBase, boolean>;
variable Enums
const Enums: { Accuracy: typeof CoreTypes.Accuracy; AndroidActionBarIconVisibility: typeof CoreTypes.AndroidActionBarIconVisibility; AndroidActionItemPosition: typeof CoreTypes.AndroidActionItemPosition; AnimationCurve: typeof CoreTypes.AnimationCurve; AutocapitalizationType: typeof CoreTypes.AutocapitalizationType; BackgroundRepeat: typeof CoreTypes.BackgroundRepeat; DeviceOrientation: typeof CoreTypes.DeviceOrientation; DeviceType: typeof CoreTypes.DeviceType; Dock: typeof CoreTypes.Dock; FontAttributes: typeof CoreTypes.FontAttributes; FontStyle: typeof CoreTypes.FontStyle; FontWeight: typeof CoreTypes.FontWeight; HorizontalAlignment: typeof CoreTypes.HorizontalAlignment; IOSActionItemPosition: typeof CoreTypes.IOSActionItemPosition; ImageFormat: typeof CoreTypes.ImageFormat; KeyboardType: typeof CoreTypes.KeyboardType; NavigationBarVisibility: typeof CoreTypes.NavigationBarVisibility; Orientation: typeof CoreTypes.Orientation; ReturnKeyType: typeof CoreTypes.ReturnKeyType; StatusBarStyle: typeof CoreTypes.StatusBarStyle; Stretch: typeof CoreTypes.ImageStretch; SystemAppearance: typeof CoreTypes.SystemAppearance; TextAlignment: CoreTypes.TextAlignmentType; TextDecoration: CoreTypes.TextDecorationType; TextTransform: CoreTypes.TextTransformType; UpdateTextTrigger: CoreTypes.UpdateTextTriggerType; VerticalAlignment: CoreTypes.VerticalAlignmentType; Visibility: CoreTypes.VisibilityType; WhiteSpace: CoreTypes.WhiteSpaceType;};
Deprecated
Use
CoreTypes
instead. Enums will be removed in 9.0
variable fontFamilyProperty
const fontFamilyProperty: InheritedCssProperty<Style, string>;
variable fontInternalProperty
const fontInternalProperty: InheritedCssProperty<Style, Font>;
variable fontSizeProperty
const fontSizeProperty: InheritedCssProperty<Style, number>;
variable fontStyleProperty
const fontStyleProperty: InheritedCssProperty<Style, FontStyle>;
variable fontWeightProperty
const fontWeightProperty: InheritedCssProperty<Style, FontWeight>;
variable heightProperty
const heightProperty: CssAnimationProperty<Style, CoreTypes.PercentLengthType>;
variable hintProperty
const hintProperty: Property<EditableTextBase, string>;
variable horizontalAlignmentProperty
const horizontalAlignmentProperty: CssProperty< Style, CoreTypes.HorizontalAlignmentType>;
variable Http
const Http: { getFile: typeof getFile; getImage: typeof getImage; getJSON: typeof getJSON; getString: typeof httpGetString; request: ( options: import('./http').HttpRequestOptions ) => Promise<import('./http').HttpResponse>;};
variable isAndroid
const isAndroid: boolean;
Gets a value indicating if the app is running on the Android platform.
variable isIOS
const isIOS: boolean;
Gets a value indicating if the app is running on the iOS platform.
variable isUserInteractionEnabledProperty
const isUserInteractionEnabledProperty: Property<View, boolean>;
variable keyboardTypeProperty
const keyboardTypeProperty: Property<EditableTextBase, CoreTypes.KeyboardInputType>;
variable letterSpacingProperty
const letterSpacingProperty: CssProperty<Style, number>;
variable lineHeightProperty
const lineHeightProperty: CssProperty<Style, number>;
variable marginBottomProperty
const marginBottomProperty: CssProperty<Style, CoreTypes.PercentLengthType>;
variable marginLeftProperty
const marginLeftProperty: CssProperty<Style, CoreTypes.PercentLengthType>;
variable marginProperty
const marginProperty: ShorthandProperty< Style, | string | number | CoreTypes.LengthDipUnit | CoreTypes.LengthPxUnit | CoreTypes.LengthPercentUnit>;
variable marginRightProperty
const marginRightProperty: CssProperty<Style, CoreTypes.PercentLengthType>;
variable marginTopProperty
const marginTopProperty: CssProperty<Style, CoreTypes.PercentLengthType>;
variable maxLengthProperty
const maxLengthProperty: Property<EditableTextBase, number>;
variable minHeightProperty
const minHeightProperty: CssProperty< Style, number | CoreTypes.LengthDipUnit | CoreTypes.LengthPxUnit>;
variable minWidthProperty
const minWidthProperty: CssProperty< Style, number | CoreTypes.LengthDipUnit | CoreTypes.LengthPxUnit>;
variable opacityProperty
const opacityProperty: CssAnimationProperty<Style, number>;
variable paddingBottomProperty
const paddingBottomProperty: CssProperty<Style, CoreTypes.LengthType>;
variable paddingLeftProperty
const paddingLeftProperty: CssProperty<Style, CoreTypes.LengthType>;
variable paddingProperty
const paddingProperty: ShorthandProperty< Style, string | number | CoreTypes.LengthDipUnit | CoreTypes.LengthPxUnit>;
variable paddingRightProperty
const paddingRightProperty: CssProperty<Style, CoreTypes.LengthType>;
variable paddingTopProperty
const paddingTopProperty: CssProperty<Style, CoreTypes.LengthType>;
variable placeholderColorProperty
const placeholderColorProperty: CssProperty<Style, Color>;
variable platformNames
const platformNames: { android: string; ios: string };
variable returnKeyTypeProperty
const returnKeyTypeProperty: Property< EditableTextBase, CoreTypes.ReturnKeyButtonType>;
variable rotateProperty
const rotateProperty: CssAnimationProperty<Style, number>;
variable scaleXProperty
const scaleXProperty: CssAnimationProperty<Style, number>;
variable scaleYProperty
const scaleYProperty: CssAnimationProperty<Style, number>;
variable textAlignmentProperty
const textAlignmentProperty: InheritedCssProperty< Style, CoreTypes.TextAlignmentType>;
variable textDecorationProperty
const textDecorationProperty: CssProperty<Style, CoreTypes.TextDecorationType>;
variable textShadowProperty
const textShadowProperty: CssProperty<Style, CSSShadow>;
variable textTransformProperty
const textTransformProperty: CssProperty<Style, CoreTypes.TextTransformType>;
variable translateXProperty
const translateXProperty: CssAnimationProperty<Style, number>;
variable translateYProperty
const translateYProperty: CssAnimationProperty<Style, number>;
variable unsetValue
const unsetValue: any;
Value specifying that Property should be set to its initial value.
variable updateTextTriggerProperty
const updateTextTriggerProperty: Property< EditableTextBase, CoreTypes.UpdateTextTriggerType>;
variable Utils
const Utils: { GC: typeof GC; RESOURCE_PREFIX: string; FILE_PREFIX: string; queueMacrotask: typeof queueMacrotask; queueGC: typeof queueGC; debounce: typeof debounce; throttle: typeof throttle; isFontIconURI: typeof isFontIconURI; isDataURI: typeof isDataURI; isFileOrResourcePath: typeof isFileOrResourcePath; executeOnMainThread: typeof executeOnMainThread; executeOnUIThread: typeof executeOnUIThread; mainThreadify: typeof mainThreadify; isMainThread: typeof isMainThread; dispatchToMainThread: typeof dispatchToMainThread; releaseNativeObject: typeof releaseNativeObject; escapeRegexSymbols: typeof escapeRegexSymbols; convertString: typeof convertString; getModuleName: typeof getModuleName; openFile: typeof openFile; openUrl: typeof openUrl; isRealDevice: typeof isRealDevice; layout: typeof layout; android: typeof androidUtils; ad: typeof androidUtils; ios: typeof iosUtils; setTimeout: typeof setTimeout; setInterval: typeof setInterval; clearInterval: typeof clearInterval; clearTimeout: typeof clearTimeout; Source: typeof Source; ClassInfo: typeof ClassInfo; getClass: typeof getClass; getBaseClasses: typeof getBaseClasses; getClassInfo: typeof getClassInfo; isBoolean: typeof isBoolean; isDefined: typeof isDefined; isFunction: typeof isFunction; isNullOrUndefined: typeof isNullOrUndefined; isNumber: typeof isNumber; isObject: typeof isObject; isString: typeof isString; isUndefined: typeof isUndefined; toUIString: typeof toUIString; verifyCallback: typeof verifyCallback; dismissSoftInput: typeof dismissSoftInput;};
variable verticalAlignmentProperty
const verticalAlignmentProperty: CssProperty<Style, CoreTypes.VerticalAlignmentType>;
variable visibilityProperty
const visibilityProperty: CssProperty<Style, CoreTypes.VisibilityType>;
variable whiteSpaceProperty
const whiteSpaceProperty: CssProperty<Style, CoreTypes.WhiteSpaceType>;
variable widthProperty
const widthProperty: CssAnimationProperty<Style, CoreTypes.PercentLengthType>;
variable zeroLength
const zeroLength: CoreTypes.LengthType;
variable zIndexProperty
const zIndexProperty: CssProperty<Style, number>;
Functions
function action
action: { ( message: string, cancelButtonText: string, actions: Array<string> ): Promise<string>; (options: ActionOptions): Promise<string>;};
The action() method displays a action box that prompts the visitor to choose some action.
Parameter message
The text to display in the dialog box.
Parameter cancelButtonText
The text to display in the cancel button.
Parameter actions
List of available actions.
The action() method displays a action box that prompts the visitor to choose some action.
Parameter options
The options for the dialog box.
function addTaggedAdditionalCSS
addTaggedAdditionalCSS: (cssText: string, tag?: string | Number) => boolean;
function addWeakEventListener
addWeakEventListener: ( source: Observable, eventName: string, handler: (eventData: EventData) => void, target: any) => void;
Attaches a WeakEventListener.
Parameter source
Observable class which emits the event.
Parameter eventName
The event name.
Parameter handler
The function which should be called when event occurs.
Parameter target
Subscriber (target) of the event listener. It will be used as a thisArg in the handler function.
function alert
alert: { (message: string | number | boolean): Promise<void>; (options: AlertOptions): Promise<void>;};
The alert() method displays an alert box with a specified message.
Parameter message
Specifies the text to display in the alert box.
The alert() method displays an alert box with a specified message.
Parameter options
Specifies the options for the alert box.
function animationTimingFunctionConverter
animationTimingFunctionConverter: (value: string) => any;
function booleanConverter
booleanConverter: (v: string) => boolean;
Converts string into boolean value. Throws error if value is not 'true' or 'false'.
function confirm
confirm: { (message: string): Promise<boolean>; (options: ConfirmOptions): Promise<boolean>;};
The confirm() method displays a dialog box with a specified message.
Parameter message
Specifies the text to display in the confirm box.
The confirm() method displays a dialog box with a specified message.
Parameter options
Specifies the options for the confirm box.
function CSSType
CSSType: (type: string) => ClassDecorator;
Specifies the type name for the instances of this View class, that is used when matching CSS type selectors.
Usage:
@CSSType("Button")class Button extends View {}Internally the decorator set
Button.prototype.cssType = "Button"
.Parameter type
The type name, e. g. "Button", "Label", etc.
function eachDescendant
eachDescendant: (view: ViewBase, callback: (child: ViewBase) => boolean) => any;
Iterates through all child views (via visual tree) and executes a function.
Parameter view
Starting view (parent container).
Parameter callback
A function to execute on every child. If function returns false it breaks the iteration.
function fromObject
fromObject: (obj: any) => Observable;
Creates an Observable instance and sets its properties according to the supplied JavaScript object. param obj - A JavaScript object used to initialize nativescript Observable instance.
function fromObjectRecursive
fromObjectRecursive: (obj: any) => Observable;
Creates an Observable instance and sets its properties according to the supplied JavaScript object. This function will create new Observable for each nested object (expect arrays and functions) from supplied JavaScript object. param obj - A JavaScript object used to initialize nativescript Observable instance.
function getAncestor
getAncestor: (view: ViewBase, criterion: string | Function) => ViewBase;
Gets an ancestor from a given type.
Parameter view
Starting view (child view).
Parameter criterion
The type of ancestor view we are looking for. Could be a string containing a class name or an actual type. Returns an instance of a view (if found), otherwise undefined.
function getCurrentPage
getCurrentPage: () => Page;
function getFileAccess
getFileAccess: () => FileSystemAccess;
Returns FileSystemAccess, a shared singleton utility class to provide methods to access and work with the file system. This is used under the hood of all the file system apis in @nativescript/core and provided as a lower level convenience if needed.
Returns
FileSystemAccess
function getRootLayout
getRootLayout: () => RootLayout;
function getTransformedText
getTransformedText: ( text: string, textTransform: CoreTypes.TextTransformType) => string;
function getViewById
getViewById: (view: ViewBase, id: string) => ViewBase;
Gets a child view by id.
Parameter view
The parent (container) view of the view to look for.
Parameter id
The id of the view to look for. Returns an instance of a view (if found), otherwise undefined.
function login
login: { ( message: string, userNameHint?: string, passwordHint?: string, userName?: string, password?: string ): Promise<LoginResult>; ( message: string, userNameHint?: string, passwordHint?: string ): Promise<LoginResult>; (options: LoginOptions): Promise<LoginResult>;};
The login() method displays a login dialog box that prompts the visitor for user name and password.
Parameter message
The text to display in the dialog box.
Parameter userNameHint
The default text to display as a hint in the username input. Optional.
Parameter passwordHint
The default text to display as a hint in the password input. Optional.
Parameter userName
The default text to display in the user name input box. Optional.
Parameter password
The default text to display in the password input box. Optional.
The login() method displays a login dialog box that prompts the visitor for user name and password.
Parameter message
The text to display in the dialog box.
Parameter userNameHint
The default text to display as a hint in the username input. Optional.
Parameter passwordHint
The default text to display as a hint in the password input. Optional.
The login() method displays a login dialog box that prompts the visitor for user name and password.
Parameter options
The options for the dialog box.
function makeParser
makeParser: <T>( isValid: (value: any) => boolean, allowNumbers?: boolean) => (value: any) => T;
function makeValidator
makeValidator: <T>(...values: T[]) => (value: any) => value is T;
function parseCSSShadow
parseCSSShadow: (value: string) => CSSShadow;
Parse a string into a CSSShadow Supports any valid css box/text shadow combination.
inspired by https://github.com/jxnblk/css-box-shadow/blob/master/index.js (MIT License)
Parameter value
function parseKeyframeDeclarations
parseKeyframeDeclarations: ( unparsedKeyframeDeclarations: KeyframeDeclaration[]) => KeyframeDeclaration[];
function profile
profile: { (name?: string): MethodDecorator; <F extends Function>(fn: F): F; <F extends Function>(name: string, fn: F): F; <T>( target: Object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor<T> ): void | TypedPropertyDescriptor<T>; (): any;};
Method decorator factory. It will intercept the method call and start and pause a timer before and after the method call. Works only if profiling is enabled.
Parameter name
Name of the timer which will be used for method calls. If not provided - the name of the method will be used.
Function factory. It will intercept the function call and start and pause a timer before and after the function call. Works only if profiling is enabled. Works only if profiling is enabled.
Parameter fn
The function to wrap. Uses the function name to track the times.
Function factory. It will intercept the function call and start and pause a timer before and after the function call. Works only if profiling is enabled.
Parameter name
The name used to track calls and times.
Parameter fn
The function to wrap.
Method decorator. It will intercept the method calls and start and pause a timer before and after the method call. Works only if profiling is enabled.
function profilingDisable
profilingDisable: () => void;
Disables profiling.
function profilingDumpProfiles
profilingDumpProfiles: () => void;
Prints the timer for all methods instrumented with profile decorator.
function profilingEnable
profilingEnable: (type?: InstrumentationMode) => void;
Enables profiling.
Upon loading of the module it will cache the package.json of the app and check if there is a "profiling" key set, its value can be one of the options available for InstrumentationMode, and if set, enable() will be called in pre app start with the value in the package.json.
An example for an
app/package.json
enabling the manual instrumentation profiling is:{"main": "main.js","profiling": "timeline"}Parameter type
Profiling mode to use. - "counters" - Accumulates method call counts and times until dumpProfiles is called and then prints aggregated statistic in the console. This is the default. - "timeline" - Outputs method names along start/end timestamps in the console on the go. - "lifecycle" - Outputs basic non-verbose times for startup, navigation, etc.
function profilingIsRunning
profilingIsRunning: (name: string) => boolean;
Returns true if a timer is currently running.
Parameter name
Name of the timer.
Returns
true is the timer is currently running.
function profilingResetProfiles
profilingResetProfiles: () => void;
Resets the timers for all methods instrumented with profile decorator.
function profilingStart
profilingStart: (name: string) => void;
Starts a timer with a specific name. Works only if profiling is enabled.
Parameter name
Name of the timer.
function profilingStartCPU
profilingStartCPU: (name: string) => void;
Starts android cpu profiling.
Parameter name
Name of the cpu profiling session.
function profilingStop
profilingStop: (name: string) => TimerInfo;
Pauses a timer with a specific name. This will increase call count and accumulate time. Works only if profiling is enabled.
Parameter name
Name of the timer.
Returns
TimerInfo for the paused timer.
function profilingStopCPU
profilingStopCPU: (name: string) => void;
Stops android cpu profiling.
Parameter name
Name of the cpu profiling session.
function profilingTime
profilingTime: () => number;
Gets accurate system timestamp in ms.
function profilingUptime
profilingUptime: () => number;
Gets the uptime of the current process in milliseconds.
function prompt
prompt: { (message: string, defaultText?: string): Promise<PromptResult>; (options: PromptOptions): Promise<PromptResult>;};
The prompt() method displays a dialog box that prompts the visitor for input.
Parameter message
The text to display in the dialog box.
Parameter defaultText
The default text to display in the input box. Optional.
The prompt() method displays a dialog box that prompts the visitor for input.
Parameter options
The options for the dialog box.
function PseudoClassHandler
PseudoClassHandler: (...pseudoClasses: string[]) => MethodDecorator;
function removeTaggedAdditionalCSS
removeTaggedAdditionalCSS: (tag: String | Number) => boolean;
function removeWeakEventListener
removeWeakEventListener: ( source: Observable, eventName: string, handler: (eventData: EventData) => void, target: any) => void;
Removes a WeakEventListener.
Parameter source
Observable class which emits the event.
Parameter eventName
The event name.
Parameter handler
The function which should be called when event occurs.
Parameter target
Subscriber (target) of the event listener. It will be used as a thisArg in the handler function.
function resolveFileNameFromUrl
resolveFileNameFromUrl: ( url: string, appDirectory: string, fileExists: (filepath: string) => boolean, importSource?: string) => string;
function sanitizeModuleName
sanitizeModuleName: (moduleName: string, removeExtension?: boolean) => string;
Helps sanitize a module name if it is prefixed with '~/', '~' or '/'
Parameter moduleName
the name
Parameter removeExtension
whether to remove extension
function setActivityCallbacks
setActivityCallbacks: (activity: any) => void;
function timeConverter
timeConverter: (value: string) => number;
function transformConverter
transformConverter: (text: string) => TransformFunctionsInfo;
Classes
class AbsoluteLayout
class AbsoluteLayout extends LayoutBase {}
A layout that lets you specify exact locations (left/top coordinates) of its children.
method getLeft
static getLeft: (view: View) => CoreTypes.LengthType;
Gets the value of the Left property from a given View.
method getTop
static getTop: (view: View) => CoreTypes.LengthType;
Gets the value of the Top property from a given View.
method setLeft
static setLeft: (view: View, value: CoreTypes.LengthType) => void;
Sets the value of the Left property from a given View.
method setTop
static setTop: (view: View, value: CoreTypes.LengthType) => void;
Sets the value of the Top property from a given View.
class ActionBar
class ActionBar extends View {}
Provides an abstraction over the ActionBar (android) and NavigationBar (iOS).
property actionItems
actionItems: ActionItems;
Gets the collection of action items.
property android
android: AndroidActionBarSettings;
Gets the android specific options of the action bar.
property effectiveContentInsetLeft
effectiveContentInsetLeft: number;
property effectiveContentInsetRight
effectiveContentInsetRight: number;
property flat
flat: boolean;
Removes the shadow/border at the bottom of the ActionBar and removes translucency on iOS. Default false.
property ios
ios: any;
Gets the native iOS [UINavigationBar](https://developer.apple.com/documentation/uikit/uinavigationbar) that represents the user interface for this component. Valid only when running on iOS.
property iosIconRenderingMode
iosIconRenderingMode: 'automatic' | 'alwaysOriginal' | 'alwaysTemplate';
Gets or set the UIImageRenderingMode of the action bar icons in iOS. Defaults to "alwaysOriginal" Valid values are: - automatic - alwaysOriginal - alwaysTemplate
property navigationButton
navigationButton: NavigationButton;
Gets or sets the navigation button (a.k.a. the back button).
property title
title: string;
Gets or sets the action bar title.
property titleView
titleView: View;
Gets or sets the title view. When set - replaces the title with a custom view.
method update
update: () => any;
Updates the action bar.
class ActionItem
class ActionItem extends ViewBase {}
Represents an action item in the action bar.
property actionBar
actionBar: ActionBar;
Gets the action bar that contains the action item.
property actionView
actionView: View;
Gets or sets the custom action view of the action item.
property android
android: AndroidActionItemSettings;
Gets the Android specific options of the action item.
property icon
icon: string;
Gets or sets the icon of the action item.
property ios
ios: IOSActionItemSettings;
Gets the iOS specific options of the action item.
property text
text: string;
Gets or sets the text of the action item.
property visibility
visibility: string;
Gets or sets the visibility of the action item.
method on
on: { (eventNames: string, callback: (data: EventData) => void): any; (event: 'tap', callback: (args: EventData) => void): any;};
A basic method signature to hook an event listener (shortcut alias to the addEventListener method).
Parameter eventNames
String corresponding to events (e.g. "propertyChange"). Optionally could be used more events separated by
,
(e.g. "propertyChange", "change").Parameter callback
Callback function which will be executed when event is raised.
Parameter thisArg
An optional parameter which will be used as
this
context for callback execution.Raised when a tap event occurs.
class ActionItems
class ActionItems {}
Represents a collection of ActionItems.
method addItem
addItem: (item: ActionItem) => void;
Adds an item to the collection.
Parameter item
the item to be added
method getItemAt
getItemAt: (index: number) => ActionItem;
Gets an item at a specified index.
Parameter index
The index.
method getItems
getItems: () => Array<ActionItem>;
Gets an array of the current action items in the collection.
method removeItem
removeItem: (item: ActionItem) => void;
Removes an item to the collection.
Parameter item
The item to be removed.
class ActivityIndicator
class ActivityIndicator extends View {}
Represents a UI widget which displays a progress indicator hinting the user for some background operation running.
property android
android: any;
Gets the native [android widget](http://developer.android.com/reference/android/widget/ProgressBar.html) that represents the user interface for this component. Valid only when running on Android OS.
property busy
busy: boolean;
Gets or sets a value indicating whether the widget is currently displaying progress.
property ios
ios: any;
Gets the native iOS [UIActivityIndicatorView](https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIActivityIndicatorView_Class/index.html) that represents the user interface for this component. Valid only when running on iOS.
class AndroidApplication
class AndroidApplication extends Observable {}
The abstraction of an Android-specific application object.
property activityBackPressedEvent
static activityBackPressedEvent: string;
String value used when hooking to activityBackPressed event.
property activityCreatedEvent
static activityCreatedEvent: string;
String value used when hooking to activityCreated event.
property activityDestroyedEvent
static activityDestroyedEvent: string;
String value used when hooking to activityDestroyed event.
property activityNewIntentEvent
static activityNewIntentEvent: string;
String value used when hooking to activityNewIntent event.
property activityPausedEvent
static activityPausedEvent: string;
String value used when hooking to activityPaused event.
property activityRequestPermissionsEvent
static activityRequestPermissionsEvent: string;
String value used when hooking to requestPermissions event.
property activityResultEvent
static activityResultEvent: string;
String value used when hooking to activityResult event.
property activityResumedEvent
static activityResumedEvent: string;
String value used when hooking to activityResumed event.
property activityStartedEvent
static activityStartedEvent: string;
String value used when hooking to activityStarted event.
property activityStoppedEvent
static activityStoppedEvent: string;
String value used when hooking to activityStopped event.
property backgrounded
backgrounded: boolean;
True if the main application activity is in background, false otherwise.
property context
context: any;
The application's [android Context](http://developer.android.com/reference/android/content/Context.html) object instance.
Deprecated
Use Utils.android.getApplicationContext() instead.
property foregroundActivity
foregroundActivity: any;
The currently active (loaded) [android Activity](http://developer.android.com/reference/android/app/Activity.html). This property is automatically updated upon Activity events.
property init
init: (nativeApp: any) => void;
Initialized the android-specific application object with the native android.app.Application instance. This is useful when creating custom application types.
Parameter nativeApp
the android.app.Application instance that started the app.
property nativeApp
nativeApp: any;
The [android Application](http://developer.android.com/reference/android/app/Application.html) object instance provided to the init of the module.
property orientation
orientation: 'portrait' | 'landscape' | 'unknown';
Gets the orientation of the application. Available values: "portrait", "landscape", "unknown".
property packageName
packageName: string;
The name of the application package.
Deprecated
Use Utils.android.getPackageName() instead.
property paused
paused: boolean;
True if the main application activity is not running (suspended), false otherwise.
property saveActivityStateEvent
static saveActivityStateEvent: string;
String value used when hooking to saveActivityState event.
property startActivity
startActivity: any;
The main (start) Activity for the application.
property systemAppearance
systemAppearance: 'dark' | 'light';
Gets the system appearance. Available values: "dark", "light".
method getRegisteredBroadcastReceiver
getRegisteredBroadcastReceiver: (intentFilter: string) => any;
Get a registered BroadcastReceiver, then you can get the result code of BroadcastReceiver in onReceiveCallback method.
Parameter intentFilter
A string containing the intent filter.
method on
on: { ( eventNames: string, callback: (data: AndroidActivityEventData) => void, thisArg?: any ): any; ( event: 'activityCreated', callback: (args: AndroidActivityBundleEventData) => void, thisArg?: any ): any; ( event: 'activityDestroyed', callback: (args: AndroidActivityEventData) => void, thisArg?: any ): any; ( event: 'activityStarted', callback: (args: AndroidActivityEventData) => void, thisArg?: any ): any; ( event: 'activityPaused', callback: (args: AndroidActivityEventData) => void, thisArg?: any ): any; ( event: 'activityResumed', callback: (args: AndroidActivityEventData) => void, thisArg?: any ): any; ( event: 'activityStopped', callback: (args: AndroidActivityEventData) => void, thisArg?: any ): any; ( event: 'saveActivityState', callback: (args: AndroidActivityBundleEventData) => void, thisArg?: any ): any; ( event: 'activityResult', callback: (args: AndroidActivityResultEventData) => void, thisArg?: any ): any; ( event: 'activityBackPressed', callback: (args: AndroidActivityBackPressedEventData) => void, thisArg?: any ): any; ( event: 'activityNewIntent', callback: (args: AndroidActivityNewIntentEventData) => void, thisArg?: any ): any; ( event: 'activityRequestPermissions', callback: (args: AndroidActivityRequestPermissionsEventData) => void, thisArg?: any ): any;};
A basic method signature to hook an event listener (shortcut alias to the addEventListener method).
Parameter eventNames
String corresponding to events (e.g. "propertyChange"). Optionally could be used more events separated by
,
(e.g. "propertyChange", "change").Parameter callback
Callback function which will be executed when event is raised.
Parameter thisArg
An optional parameter which will be used as
this
context for callback execution.This event is raised on android application ActivityCreated.
This event is raised on android application ActivityDestroyed.
This event is raised on android application ActivityStarted.
This event is raised on android application ActivityPaused.
This event is raised on android application ActivityResumed.
This event is raised on android application ActivityStopped.
This event is raised on android application SaveActivityState.
This event is raised on android application ActivityResult.
This event is raised on the back button is pressed in an android application.
This event is raised when the Android app was launched by an Intent with data.
This event is raised when the Android activity requests permissions.
method registerBroadcastReceiver
registerBroadcastReceiver: ( intentFilter: string, onReceiveCallback: (context: any, intent: any) => void) => void;
Register a BroadcastReceiver to be run in the main activity thread. The receiver will be called with any broadcast Intent that matches filter, in the main application thread. For more information, please visit 'http://developer.android.com/reference/android/content/Context.html#registerReceiver%28android.content.BroadcastReceiver,%20android.content.IntentFilter%29'
Parameter intentFilter
A string containing the intent filter.
Parameter onReceiveCallback
A callback function that will be called each time the receiver receives a broadcast.
method unregisterBroadcastReceiver
unregisterBroadcastReceiver: (intentFilter: string) => void;
Unregister a previously registered BroadcastReceiver. For more information, please visit 'http://developer.android.com/reference/android/content/Context.html#unregisterReceiver(android.content.BroadcastReceiver)'
Parameter intentFilter
A string containing the intent filter with which the receiver was originally registered.
class Animation
class Animation {}
Defines a animation set.
constructor
constructor( animationDefinitions: AnimationDefinition[], playSequentially?: boolean);
property cancel
cancel: () => void;
property isPlaying
isPlaying: boolean;
property play
play: (resetOnFinish?: boolean) => AnimationPromise;
class Background
class Background {}
property borderBottomColor
borderBottomColor: Color;
property borderBottomLeftRadius
borderBottomLeftRadius: number;
property borderBottomRightRadius
borderBottomRightRadius: number;
property borderBottomWidth
borderBottomWidth: number;
property borderLeftColor
borderLeftColor: Color;
property borderLeftWidth
borderLeftWidth: number;
property borderRightColor
borderRightColor: Color;
property borderRightWidth
borderRightWidth: number;
property borderTopColor
borderTopColor: Color;
property borderTopLeftRadius
borderTopLeftRadius: number;
property borderTopRightRadius
borderTopRightRadius: number;
property borderTopWidth
borderTopWidth: number;
property boxShadow
boxShadow: CSSShadow;
property clearFlags
clearFlags: number;
property clipPath
clipPath: string;
property color
color: Color;
property default
static default: Background;
property image
image: string | LinearGradient;
property position
position: string;
property repeat
repeat: CoreTypes.BackgroundRepeatType;
property size
size: string;
method equals
static equals: (value1: Background, value2: Background) => boolean;
method getBoxShadow
getBoxShadow: () => CSSShadow;
method getUniformBorderColor
getUniformBorderColor: () => Color;
method getUniformBorderRadius
getUniformBorderRadius: () => number;
method getUniformBorderWidth
getUniformBorderWidth: () => number;
method hasBorderColor
hasBorderColor: () => boolean;
method hasBorderRadius
hasBorderRadius: () => boolean;
method hasBorderWidth
hasBorderWidth: () => boolean;
method hasBoxShadow
hasBoxShadow: () => boolean;
method hasUniformBorder
hasUniformBorder: () => boolean;
method hasUniformBorderColor
hasUniformBorderColor: () => boolean;
method hasUniformBorderRadius
hasUniformBorderRadius: () => boolean;
method hasUniformBorderWidth
hasUniformBorderWidth: () => boolean;
method isEmpty
isEmpty: () => boolean;
method toString
toString: () => string;
method withBorderBottomColor
withBorderBottomColor: (value: Color) => Background;
method withBorderBottomLeftRadius
withBorderBottomLeftRadius: (value: number) => Background;
method withBorderBottomRightRadius
withBorderBottomRightRadius: (value: number) => Background;
method withBorderBottomWidth
withBorderBottomWidth: (value: number) => Background;
method withBorderLeftColor
withBorderLeftColor: (value: Color) => Background;
method withBorderLeftWidth
withBorderLeftWidth: (value: number) => Background;
method withBorderRightColor
withBorderRightColor: (value: Color) => Background;
method withBorderRightWidth
withBorderRightWidth: (value: number) => Background;
method withBorderTopColor
withBorderTopColor: (value: Color) => Background;
method withBorderTopLeftRadius
withBorderTopLeftRadius: (value: number) => Background;
method withBorderTopRightRadius
withBorderTopRightRadius: (value: number) => Background;
method withBorderTopWidth
withBorderTopWidth: (value: number) => Background;
method withBoxShadow
withBoxShadow: (value: CSSShadow) => Background;
method withClipPath
withClipPath: (value: string) => Background;
method withColor
withColor: (value: Color) => Background;
method withImage
withImage: (value: string | LinearGradient) => Background;
method withPosition
withPosition: (value: string) => Background;
method withRepeat
withRepeat: (value: CoreTypes.BackgroundRepeatType) => Background;
method withSize
withSize: (value: string) => Background;
class Binding
class Binding {}
constructor
constructor(target: ViewBase, options: BindingOptions);
property options
options: BindingOptions;
property sourceIsBindingContext
sourceIsBindingContext: boolean;
property target
target: WeakRef<ViewBase>;
property updating
updating: boolean;
method bind
bind: (source: any) => void;
method clearBinding
clearBinding: () => void;
method clearSource
clearSource: () => void;
method loadedHandlerVisualTreeBinding
loadedHandlerVisualTreeBinding: (args: any) => void;
method onSourcePropertyChanged
onSourcePropertyChanged: (data: PropertyChangeData) => void;
method unbind
unbind: () => void;
class Builder
class Builder {}
property knownCollections
static knownCollections: Set<string>;
property knownMultiTemplates
static knownMultiTemplates: Set<string>;
property knownTemplates
static knownTemplates: Set<string>;
UI plugin developers can add to these to define their own custom types if needed
method createViewFromEntry
static createViewFromEntry: (entry: NavigationEntry) => View;
Creates view from navigation entry
Parameter entry
NavigationEntry
method load
static load: { (moduleName: string, exports?: any): View; (options: LoadOptions): View;};
Loads component from module with context
Parameter moduleName
the module name
Parameter exports
the context of the component to be loaded
Loads component from options
Parameter options
Load options
method parse
static parse: (value: string | Template, exports?: any) => View;
method parseMultipleTemplates
static parseMultipleTemplates: ( value: string, exports?: any) => Array<KeyedTemplate>;
Creates an array of KeyedTemplates from string
Parameter value
The xml of the template to be parsed
Parameter exports
Current context of the template
class Button
class Button extends TextBase {}
Represents a standard Button widget.
property android
android: any;
Gets the native [android widget](http://developer.android.com/reference/android/widget/Button.html) that represents the user interface for this component. Valid only when running on Android OS.
property ios
ios: any;
Gets the native [UIButton](https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIButton_Class/) that represents the user interface for this component. Valid only when running on iOS.
property tapEvent
static tapEvent: string;
String value used when hooking to tap event.
property textWrap
textWrap: boolean;
Gets or sets whether the Button wraps text or not.
method on
on: { ( eventNames: string, callback: (data: EventData) => void, thisArg?: any ): any; (event: 'tap', callback: (args: EventData) => void, thisArg?: any): any;};
A basic method signature to hook an event listener (shortcut alias to the addEventListener method).
Parameter eventNames
String corresponding to events (e.g. "propertyChange"). Optionally could be used more events separated by
,
(e.g. "propertyChange", "change").Parameter callback
Callback function which will be executed when event is raised.
Parameter thisArg
An optional parameter which will be used as
this
context for callback execution.Raised when a tap event occurs.
class ChangeType
class ChangeType {}
class CoercibleProperty
class CoercibleProperty<T extends ViewBase, U> extends Property<T, U> implements CoercibleProperty<T, U> {}
constructor
constructor(options: CoerciblePropertyOptions<T, U>);
property coerce
readonly coerce: (target: T) => void;
class Color
class Color {}
Represents a color object. Stores all color components (alpha (opacity), red, green, blue) in a [0..255] range.
constructor
constructor(knownColor: string);
constructor
constructor(hex: string);
constructor
constructor(argb: number);
constructor
constructor( alpha: number, red: number, green: number, blue: number, type?: 'rgb' | 'hsl' | 'hsv');
property a
a: number;
Gets the Alpha component (in the [0, 255] range) of this color. This is a read-only property.
property android
android: number;
Gets the android-specific integer value representation. Same as the Argb one. This is a read-only property.
property argb
argb: number;
Gets the Argb Number representation of this color where each 8 bits represent a single color component. This is a read-only property.
property b
b: number;
Gets the Blue component (in the [0, 255] range) of this color. This is a read-only property.
property g
g: number;
Gets the Green component (in the [0, 255] range) of this color. This is a read-only property.
property hex
hex: string;
Gets the Hexadecimal string representation of this color. This is a read-only property.
property ios
ios: any;
Gets the iOS-specific UIColor value representation. This is a read-only property.
property name
name: string;
Gets the known name of this instance. Defined only if it has been constructed from a known color name - e.g. "red". This is a read-only property.
property r
r: number;
Gets the Red component (in the [0, 255] range) of this color. This is a read-only property.
method brighten
brighten: (amount: number) => Color;
Brighten the color a given amount, from 0 to 100.
Parameter amount
(between 0 and 100)
method complement
complement: () => Color;
returns the color complement
method darken
darken: (amount: number) => Color;
Darken the color a given amount, from 0 to 100. Providing 100 will always return black.
Parameter amount
(between 0 and 100)
method desaturate
desaturate: (amount: number) => Color;
Desaturate the color a given amount, from 0 to 100. Providing 100 will is the same as calling greyscale.
Parameter amount
(between 0 and 100)
method equals
static equals: (value1: Color, value2: Color) => boolean;
Specifies whether this Color is equal to the Color parameter.
Parameter value
The Color to test.
Compares two Color instances.
Parameter value1
A Color to compare.
Parameter value2
A Color to compare.
method fromHSL
static fromHSL: (a: any, h: any, s: any, l: any) => Color;
returns a new Color from HSL
method fromHSV
static fromHSV: (a: any, h: any, s: any, l: any) => Color;
method fromIosColor
static fromIosColor: (value: any) => Color;
Creates color from iOS-specific UIColor value representation.
method getBrightness
getBrightness: () => number;
return the [brightness](http://www.w3.org/TR/AERT#color-contrast)
method getLuminance
getLuminance: () => number;
return the [luminance](http://www.w3.org/TR/2008/REC-WCAG20-20081211/#relativeluminancedef)
method greyscale
greyscale: () => Color;
Completely desaturates a color into greyscale. Same as calling desaturate(100).
Returns
method isDark
isDark: () => boolean;
return true if brightenss < 128
method isLight
isLight: () => boolean;
return true if brightenss >= 128
method isValid
static isValid: (value: any) => boolean;
Validates if a value can be converted to color.
Parameter value
Input string.
method lighten
lighten: (amount: number) => Color;
Lighten the color a given amount, from 0 to 100. Providing 100 will always return white.
Parameter amount
(between 0 and 100)
Returns
olor : Color
method mix
static mix: (color1: Color, color2: Color, amount: number) => Color;
returns the color complement
method saturate
saturate: (amount: number) => Color;
Saturate the color a given amount, from 0 to 100.
Parameter amount
(between 0 and 100)
method setAlpha
setAlpha: (a: number) => Color;
Return this color (as a new Color instance) with the provided alpha
Parameter alpha
(between 0 and 255)
method spin
spin: (amount: number) => Color;
Spin the hue a given amount, from -360 to 360. Calling with 0, 360, or -360 will do nothing (since it sets the hue back to what it was before).
Parameter amount
(between 0 and 100)
method toHsl
toHsl: () => { h: number; s: number; l: number; a: number };
return the hsl representation of the color
method toHslString
toHslString: () => string;
return the [CSS hsv](https://www.w3schools.com/Css/css_colors_hsl.asp) representation of the color
method toHsv
toHsv: () => { h: number; s: number; v: number; a: number };
return the hsv representation of the color
method toHsvString
toHsvString: () => string;
return the [CSS hsv](https://www.w3schools.com/Css/css_colors_rgb.asp) representation of the color
method toRgbString
toRgbString: () => string;
return the [CSS rgb](https://www.w3schools.com/Css/css_colors_rgb.asp) representation of the color
class ContainerView
class ContainerView extends View {}
Base class for all UI components that are containers.
property iosOverflowSafeArea
iosOverflowSafeArea: boolean;
Instruct container view to expand beyond the safe area. This property is iOS specific. Default value: true
class ContentView
class ContentView extends CustomLayoutView implements AddChildFromBuilder {}
property content
content: View;
method layoutView
layoutView: () => View;
class ControlStateChangeListener
class ControlStateChangeListener {}
An utility class used for supporting styling infrastructure. WARNING: This class is intended for IOS only.
constructor
constructor(control: any, callback: (state: string) => void);
Initializes an instance of ControlStateChangeListener class.
Parameter control
An instance of the UIControl which state will be watched.
Parameter callback
A callback called when a visual state of the UIControl is changed.
method start
start: () => any;
method stop
stop: () => any;
class CssAnimationParser
class CssAnimationParser {}
method keyframeAnimationsFromCSSDeclarations
static keyframeAnimationsFromCSSDeclarations: ( declarations: KeyframeDeclaration[]) => KeyframeAnimationInfo[];
method keyframesArrayFromCSS
static keyframesArrayFromCSS: (keyframes: UnparsedKeyframe[]) => KeyframeInfo[];
class CssAnimationProperty
class CssAnimationProperty<T extends Style, U> implements CssAnimationProperty<T, U> {}
constructor
constructor(options: CssAnimationPropertyOptions<T, U>);
property cssLocalName
readonly cssLocalName: string;
property cssName
readonly cssName: string;
property defaultValue
readonly defaultValue: {};
property defaultValueKey
readonly defaultValueKey: Symbol;
property getDefault
readonly getDefault: Symbol;
property isStyleProperty
isStyleProperty: boolean;
property key
readonly key: Symbol;
property keyframe
readonly keyframe: string;
property name
readonly name: string;
property register
readonly register: (cls: { prototype: any }) => void;
property setNative
readonly setNative: Symbol;
method isSet
isSet: (instance: T) => boolean;
class CssProperty
class CssProperty<T extends Style, U> implements CssProperty