ViewCommon | API - NativeScript
Summary
Constructors
constructor
Properties
_androidContentDescriptionUpdated
_androidContentDescriptionUpdated?: boolean_closeModalCallback
Protected
_closeModalCallback: Function_currentHeightMeasureSpec
_currentHeightMeasureSpec: number_currentWidthMeasureSpec
_currentWidthMeasureSpec: number_gestureObservers
_isLayoutValid
Protected
_manager
_modalParent
_setMinHeightNative
_setMinWidthNative
accessibilityHint
accessibilityHint: stringaccessibilityIdentifier
accessibilityIdentifier: stringaccessibilityLabel
accessibilityLabel: stringaccessibilityValue
accessibilityValue: stringignoreTouchAnimation
ignoreTouchAnimation: booleaniosIgnoreSafeArea
iosIgnoreSafeArea: booleaniosOverflowSafeArea
iosOverflowSafeArea: booleaniosOverflowSafeAreaEnabled
iosOverflowSafeAreaEnabled: booleanisEnabled
isUserInteractionEnabled
isUserInteractionEnabled: booleanoriginX
originY
testID
touchAnimation
touchDelay
transitionId
Active transition instance id for tracking state
accessibilityBlurEvent
Static
accessibilityBlurEvent: stringaccessibilityFocusChangedEvent
Static
accessibilityFocusChangedEvent: stringaccessibilityFocusEvent
Static
accessibilityFocusEvent: stringaccessibilityPerformEscapeEvent
Static
accessibilityPerformEscapeEvent: stringlayoutChangedEvent
Static
layoutChangedEvent: stringshowingModallyEvent
Static
showingModallyEvent: stringshownModallyEvent
Static
shownModallyEvent: stringAccessors
accessibilityHidden
get accessibilityHidden(): booleanaccessibilityLanguage
get accessibilityLanguage(): stringaccessibilityLiveRegion
accessibilityMediaSession
get accessibilityMediaSession(): booleanaccessibilityRole
accessibilityState
accessible
get accessible(): booleanandroidDynamicElevationOffset
get androidDynamicElevationOffset(): numberandroidElevation
get androidElevation(): numberautomationText
get automationText(): stringbackground
backgroundImage
get backgroundImage(): string | LinearGradientReturns string | LinearGradient
backgroundPosition
get backgroundPosition(): stringbackgroundRepeat
backgroundSize
get backgroundSize(): stringborderBottomLeftRadius
borderBottomRightRadius
borderBottomWidth
borderLeftWidth
borderRadius
borderRightWidth
borderTopLeftRadius
borderTopRightRadius
borderTopWidth
borderWidth
boxShadow
get boxShadow(): CSSShadowcolor
css
cssType
height
horizontalAlignment
iosAccessibilityAdjustsFontSize
get iosAccessibilityAdjustsFontSize(): booleaniosAccessibilityMaxFontScale
get iosAccessibilityMaxFontScale(): numberiosAccessibilityMinFontScale
get iosAccessibilityMinFontScale(): numberisLayoutRequired
get isLayoutRequired(): booleanisLayoutValid
get isLayoutValid(): booleanmargin
marginBottom
marginLeft
marginRight
marginTop
minHeight
minWidth
modal
opacity
perspective
get perspective(): numberrotate
rotateX
rotateY
scaleX
scaleY
textTransform
translateX
translateY
verticalAlignment
visibility
width
Methods
_applyBackground
_applyBackground(
background: any,
isBorderDrawable: boolean,
onlyColor: boolean,
backgroundDrawable: any
): void_closeAllModalViewsInternal
_closeAllModalViewsInternal(): boolean_eachLayoutView
_eachLayoutView(callback: (View: any) => void): void_getCurrentLayoutBounds
_getCurrentLayoutBounds(): {
bottom: number
left: number
right: number
}Returns { bottom: number left: number right: number }
_getFragmentManager
_getFragmentManager(): any_getNativeViewsCount
_getNativeViewsCount(): number_getRootModalViews
_getValue
_handleLivesync
_handleLivesync(context?: ModuleContext): boolean_hideNativeModalView
Protected
_hideNativeModalView(parent: ViewCommon, whenClosedCallback: () => void): void
_observe
_onAttachedToWindow
_onAttachedToWindow(): void_onDetachedFromWindow
_onDetachedFromWindow(): void_onLivesync
_onLivesync(context?: ModuleContext): boolean_raiseLayoutChangedEvent
Protected
_raiseLayoutChangedEvent(): void_raiseShowingModallyEvent
Protected
_raiseShowingModallyEvent(): void_raiseShownModallyEvent
Protected
_raiseShownModallyEvent(): void_redrawNativeBackground
_redrawNativeBackground(value: any): void_setCurrentLayoutBounds
_setCurrentLayoutBounds(
left: number,
top: number,
right: number,
bottom: number
): {
boundsChanged: boolean
}Returns two booleans - the first if "boundsChanged" the second is "sizeChanged".
Returns { boundsChanged: boolean }
_setCurrentMeasureSpecs
_setCurrentMeasureSpecs(
widthMeasureSpec: number,
heightMeasureSpec: number
): boolean_setNativeClipToBounds
_setNativeClipToBounds(): void_setNativeViewFrame
_setNativeViewFrame(nativeView: any, frame: any): void_setValue
_setupAsRootView
_setupAsRootView(context: any): void_showNativeModalView
Protected
_updateEffectiveLayoutValues
_updateEffectiveLayoutValues(
parentWidthMeasureSize: number,
parentWidthMeasureMode: number,
parentHeightMeasureSize: number,
parentHeightMeasureMode: number
): void_updateStyleScope
_updateStyleScope(
cssFileName?: string,
cssString?: string,
css?: string
): voidaccessibilityAnnouncement
accessibilityAnnouncement(msg?: string): voidaccessibilityScreenChanged
accessibilityScreenChanged(): voidaddCss
addCss(cssString: string): voidaddCssFile
addCssFile(cssFileName: string): voidaddEventListener
animate
animate(animation: any): AnimationPromisechangeCssFile
changeCssFile(cssFileName: string): voidcloseModal
closeModal(...args: any[]): voidcreateAnimation
focus
getActualSize
getGestureObservers
getLocationInWindow
getLocationInWindow(): PointgetLocationOnScreen
getLocationOnScreen(): PointgetMeasuredHeight
getMeasuredHeight(): numbergetMeasuredState
getMeasuredState(): numbergetMeasuredWidth
getMeasuredWidth(): numbergetSafeAreaInsets
getSafeAreaInsets(): {
bottom: any
left: any
right: any
}Returns { bottom: any left: any right: any }
layout
layout(left: number, top: number, right: number, bottom: number): voidlayoutNativeView
Abstract
layoutNativeView(
left: number,
top: number,
right: number,
bottom: number
): voidmeasure
measure(widthMeasureSpec: number, heightMeasureSpec: number): voidonBackPressed
onLayout(left: number, top: number, right: number, bottom: number): voidonLoaded
onMeasure(widthMeasureSpec: number, heightMeasureSpec: number): voidremoveEventListener
removeEventListener(arg: string | GestureTypes, callback?: (data: EventData) => void, thisArg?: any): void
requestLayout
resetNativeView
sendAccessibilityEvent
sendAccessibilityEvent(options: Partial<AccessibilityEventOptions>): voidsetMeasuredDimension
setMeasuredDimension(measuredWidth: number, measuredHeight: number): voidsetTestID
setTestID(view: any, value: string): voidcombineMeasuredStates
Static
combineMeasuredStates(curState: number, newState: any): numberlayoutChild(parent: View, child: View, left: number, top: number, right: number, bottom: number, setFrame?: boolean): void
measureChild(parent: ViewCommon, child: ViewCommon, widthMeasureSpec: number, heightMeasureSpec: number): { measuredHeight: number }
Returns { measuredHeight: number }
resolveSizeAndState
Static
resolveSizeAndState(
size: number,
specSize: number,
specMode: number,
childMeasuredState: number
): number