πŸš€ 8.9 Released! β†’ ⚑️ New Node-API Engine Preview, πŸ“² ns widget ios, πŸ’… Tailwind v4 and more...
Read Announcement
ViewCommon

Summary ​

Constructors

constructor

Properties

_androidContentDescriptionUpdated
_closeModalCallback
_currentHeightMeasureSpec
_currentWidthMeasureSpec
_gestureObservers
_isLayoutValid
_manager
_modalParent
_setMinHeightNative
_setMinWidthNative
accessibilityBlurEvent
accessibilityFocusChangedEvent
accessibilityFocusEvent
accessibilityHint
accessibilityIdentifier
accessibilityLabel
accessibilityPerformEscapeEvent
accessibilityValue
ignoreTouchAnimation
iosIgnoreSafeArea
iosOverflowSafeArea
iosOverflowSafeAreaEnabled
isEnabled
isUserInteractionEnabled
layoutChangedEvent
originX
originY
showingModallyEvent
shownModallyEvent
testID
touchAnimation
touchDelay
transitionId
69 properties inherited from ViewBase
Click to expand
_automaticallyAdjustsScrollViewInsets
_context
_cssState
_defaultPaddingBottom
_defaultPaddingLeft
_defaultPaddingRight
_defaultPaddingTop
_domId
_ignoreFlexMinWidthHeightReset
_isAddedToNativeVisualTree
_isPaddingRelative
_isStyleScopeHost
_oldBottom
_oldLeft
_oldRight
_oldTop
_styleScope
_suspendNativeUpdatesCount
alignSelf
bindingContext
className
col
colSpan
column
columnSpan
createdEvent
cssClasses
cssPseudoClasses
disposeNativeViewEvent
dock
domNode
effectiveBorderBottomWidth
effectiveBorderLeftWidth
effectiveBorderRightWidth
effectiveBorderTopWidth
effectiveHeight
effectiveLeft
effectiveMarginBottom
effectiveMarginLeft
effectiveMarginRight
effectiveMarginTop
effectiveMinHeight
effectiveMinWidth
effectivePaddingBottom
effectivePaddingLeft
effectivePaddingRight
effectivePaddingTop
effectiveTop
effectiveWidth
flexGrow
flexShrink
flexWrapBefore
id
isCollapsed
left
loadedEvent
nativeViewProtected
order
parent
propertyChangeEvent
recycleNativeView
reusable
row
rowSpan
sharedTransitionIgnore
sharedTransitionTag
top
unloadedEvent
viewController

Accessors

accessibilityHidden
accessibilityLanguage
accessibilityLiveRegion
accessibilityMediaSession
accessibilityRole
accessibilityState
accessible
androidDynamicElevationOffset
androidElevation
automationText
background
backgroundColor
backgroundImage
backgroundPosition
backgroundRepeat
backgroundSize
borderBottomColor
borderBottomLeftRadius
borderBottomRightRadius
borderBottomWidth
borderColor
borderLeftColor
borderLeftWidth
borderRadius
borderRightColor
borderRightWidth
borderTopColor
borderTopLeftRadius
borderTopRightRadius
borderTopWidth
borderWidth
boxShadow
color
css
cssType
height
horizontalAlignment
iosAccessibilityAdjustsFontSize
iosAccessibilityMaxFontScale
iosAccessibilityMinFontScale
isLayoutRequired
isLayoutValid
margin
marginBottom
marginLeft
marginRight
marginTop
minHeight
minWidth
modal
opacity
perspective
rotate
rotateX
rotateY
scaleX
scaleY
textTransform
translateX
translateY
verticalAlignment
visibility
width
9 accessors inherited from ViewBase
Click to expand
android
class
ios
isLoaded
nativeView
page
parentNode
style
typeName

Methods

_applyBackground
_closeAllModalViewsInternal
_eachLayoutView
_getCurrentLayoutBounds
_getFragmentManager
_getNativeViewsCount
_getRootModalViews
_getValue
_handleLivesync
_hasAncestorView
_hideNativeModalView
_observe
_onAttachedToWindow
_onDetachedFromWindow
_onLivesync
_raiseLayoutChangedEvent
_raiseShowingModallyEvent
_raiseShownModallyEvent
_redrawNativeBackground
_removeAnimation
_setCurrentLayoutBounds
_setCurrentMeasureSpecs
_setNativeClipToBounds
_setNativeViewFrame
_setupAsRootView
_setValue
_showNativeModalView
_updateEffectiveLayoutValues
_updateStyleScope
accessibilityAnnouncement
accessibilityScreenChanged
addCss
addCssFile
addEventListener
animate
changeCssFile
closeModal
combineMeasuredStates
createAnimation
eachChild
eachChildView
focus
getActualSize
getGestureObservers
getLocationInWindow
getLocationOnScreen
getLocationRelativeTo
getMeasuredHeight
getMeasuredState
getMeasuredWidth
getSafeAreaInsets
layout
layoutChild
layoutNativeView
measure
measureChild
onBackPressed
onLayout
onLoaded
onMeasure
removeEventListener
requestLayout
resetNativeView
resolveSizeAndState
sendAccessibilityEvent
setMeasuredDimension
setTestID
showModal
56 methods inherited from ViewBase
Click to expand
_addView
_addViewCore
_addViewToNativeVisualTree
_applyXmlAttribute
_batchUpdate
_childIndexToNativeChildIndex
_createPropertyChangeData
_dialogClosed
_emit
_goToVisualState
_inheritStyleScope
_layoutParent
_onRootViewReset
_parentChanged
_removeView
_removeViewCore
_removeViewFromNativeVisualTree
_resumeNativeUpdates
_setupUI
_shouldDelayLayout
_suspendNativeUpdates
_tearDownUI
addEventListener
addPseudoClass
bind
callLoaded
callUnloaded
createNativeView
deletePseudoClass
destroyNode
disposeNativeView
ensureDomNode
get
getViewByDomId
getViewById
hasListeners
initNativeView
loadView
notify
notifyPropertyChange
off
off
on
on
once
once
onResumeNativeUpdates
onUnloaded
removeEventListener
set
setInlineStyle
setNativeView
setProperty
toString
unbind
unloadView

Constructors ​

constructor ​

new ViewCommon(): ViewCommon 

Properties ​

_androidContentDescriptionUpdated ​

_androidContentDescriptionUpdated?: boolean

_closeModalCallback ​

Protected
_closeModalCallback: Function

_currentHeightMeasureSpec ​

_currentHeightMeasureSpec: number

_currentWidthMeasureSpec ​

_currentWidthMeasureSpec: number

_gestureObservers ​

_isLayoutValid ​

Protected
_isLayoutValid: boolean

_setMinHeightNative ​

_setMinHeightNative: (value: LengthType) => void

_setMinWidthNative ​

_setMinWidthNative: (value: LengthType) => void

accessibilityHint ​

accessibilityHint: string

accessibilityIdentifier ​

accessibilityIdentifier: string

accessibilityLabel ​

accessibilityLabel: string

accessibilityValue ​

accessibilityValue: string

ignoreTouchAnimation ​

ignoreTouchAnimation: boolean

iosIgnoreSafeArea ​

iosIgnoreSafeArea: boolean

iosOverflowSafeArea ​

iosOverflowSafeArea: boolean

iosOverflowSafeAreaEnabled ​

iosOverflowSafeAreaEnabled: boolean

isEnabled ​

isUserInteractionEnabled ​

isUserInteractionEnabled: boolean

touchAnimation ​

touchDelay ​

transitionId ​

transitionId: number
Active transition instance id for tracking state

accessibilityBlurEvent ​

Static
accessibilityBlurEvent: string

accessibilityFocusChangedEvent ​

Static
accessibilityFocusChangedEvent: string

accessibilityFocusEvent ​

Static
accessibilityFocusEvent: string

accessibilityPerformEscapeEvent ​

Static
accessibilityPerformEscapeEvent: string

layoutChangedEvent ​

Static
layoutChangedEvent: string

showingModallyEvent ​

Static
showingModallyEvent: string

shownModallyEvent ​

Static
shownModallyEvent: string

Accessors ​

accessibilityHidden ​

get accessibilityHidden(): boolean

accessibilityLanguage ​

get accessibilityLanguage(): string

accessibilityLiveRegion ​

accessibilityMediaSession ​

get accessibilityMediaSession(): boolean

accessibilityRole ​

accessibilityState ​

accessible ​

get accessible(): boolean

androidDynamicElevationOffset ​

get androidDynamicElevationOffset(): number

androidElevation ​

get androidElevation(): number

automationText ​

get automationText(): string

background ​

get background(): string

backgroundColor ​

get backgroundColor(): Color 

backgroundImage ​

get backgroundImage(): string | LinearGradient
Returns string | LinearGradient

backgroundPosition ​

get backgroundPosition(): string

backgroundSize ​

get backgroundSize(): string

borderBottomColor ​

get borderBottomColor(): Color 

borderBottomLeftRadius ​

get borderBottomLeftRadius(): LengthType 

borderBottomRightRadius ​

get borderBottomRightRadius(): LengthType 

borderBottomWidth ​

borderColor ​

get borderColor(): string | Color 

borderLeftColor ​

get borderLeftColor(): Color 

borderLeftWidth ​

borderRadius ​

get borderRadius(): string | number | LengthDipUnit | LengthPxUnit 

borderRightColor ​

get borderRightColor(): Color 

borderRightWidth ​

borderTopColor ​

get borderTopColor(): Color 

borderTopLeftRadius ​

get borderTopLeftRadius(): LengthType 

borderTopRightRadius ​

get borderTopRightRadius(): LengthType 

borderTopWidth ​

borderWidth ​

get borderWidth(): string | number | LengthDipUnit | LengthPxUnit 

boxShadow ​

get boxShadow(): CSSShadow

css ​

get css(): string

cssType ​

get cssType(): string

iosAccessibilityAdjustsFontSize ​

get iosAccessibilityAdjustsFontSize(): boolean

iosAccessibilityMaxFontScale ​

get iosAccessibilityMaxFontScale(): number

iosAccessibilityMinFontScale ​

get iosAccessibilityMinFontScale(): number

isLayoutRequired ​

get isLayoutRequired(): boolean

isLayoutValid ​

get isLayoutValid(): boolean

opacity ​

get opacity(): number

perspective ​

get perspective(): number

rotate ​

get rotate(): number

rotateX ​

get rotateX(): number

rotateY ​

get rotateY(): number

scaleX ​

get scaleX(): number

scaleY ​

get scaleY(): number

translateX ​

get translateX(): number

translateY ​

get translateY(): number

Methods ​

_applyBackground ​

_applyBackground(
 background: any,
 isBorderDrawable: boolean,
 onlyColor: boolean,
 backgroundDrawable: any
): void
Parameter Default Description
background
any
isBorderDrawable
boolean
onlyColor
boolean
backgroundDrawable
any
Returns void

_closeAllModalViewsInternal ​

_closeAllModalViewsInternal(): boolean

_eachLayoutView ​

_eachLayoutView(callback: (View:any) =>void): void
Parameter Default Description
callback
(View: any) => void
Returns void

_getCurrentLayoutBounds ​

_getCurrentLayoutBounds(): {
 bottom: number
 left: number
 right: number
}
Returns { bottom: number left: number right: number }

_getFragmentManager ​

_getFragmentManager(): any

_getNativeViewsCount ​

_getNativeViewsCount(): number

_getRootModalViews ​

_getRootModalViews(): ViewBase[]

_getValue ​

_getValue(): never

_handleLivesync ​

_handleLivesync(context?: ModuleContext): boolean
Parameter Default Description
context
ModuleContext
Returns boolean

_hasAncestorView ​

_hasAncestorView(ancestorView: View): boolean
Parameter Default Description
ancestorView
Returns boolean

_hideNativeModalView ​

Protected
_hideNativeModalView(parent: ViewCommon, whenClosedCallback: () => void): void
Parameter Default Description
parent
whenClosedCallback
() => void
Returns void

_observe ​

_observe(type: GestureTypes, callback: (args: GestureEventData) => void, thisArg?: any): void
Parameter Default Description
callback
(args: GestureEventData) => void
thisArg
any
Returns void

_onAttachedToWindow ​

_onAttachedToWindow(): void

_onDetachedFromWindow ​

_onDetachedFromWindow(): void

_onLivesync ​

_onLivesync(context?: ModuleContext): boolean
Parameter Default Description
context
ModuleContext
Returns boolean

_raiseLayoutChangedEvent ​

Protected
_raiseLayoutChangedEvent(): void

_raiseShowingModallyEvent ​

Protected
_raiseShowingModallyEvent(): void

_raiseShownModallyEvent ​

Protected
_raiseShownModallyEvent(): void

_redrawNativeBackground ​

_redrawNativeBackground(value: any): void
Parameter Default Description
value
any
Returns void

_removeAnimation ​

_removeAnimation(animation: Animation): boolean
Parameter Default Description
animation
Returns boolean

_setCurrentLayoutBounds ​

_setCurrentLayoutBounds(
 left: number,
 top: number,
 right: number,
 bottom: number
): {
 boundsChanged: boolean
}
Returns two booleans - the first if "boundsChanged" the second is "sizeChanged".
Parameter Default Description
left
number
top
number
right
number
bottom
number
Returns { boundsChanged: boolean }

_setCurrentMeasureSpecs ​

_setCurrentMeasureSpecs(
 widthMeasureSpec: number,
 heightMeasureSpec: number
): boolean
Parameter Default Description
widthMeasureSpec
number
heightMeasureSpec
number
Returns boolean

_setNativeClipToBounds ​

_setNativeClipToBounds(): void

_setNativeViewFrame ​

_setNativeViewFrame(nativeView: any, frame: any): void
Parameter Default Description
nativeView
any
frame
any
Returns void

_setValue ​

_setValue(): never

_setupAsRootView ​

_setupAsRootView(context: any): void
Parameter Default Description
context
any
Returns void

_showNativeModalView ​

Protected
_showNativeModalView(parent: ViewCommon, options: ShowModalOptions): void
Parameter Default Description
parent
Returns void

_updateEffectiveLayoutValues ​

_updateEffectiveLayoutValues(
 parentWidthMeasureSize: number,
 parentWidthMeasureMode: number,
 parentHeightMeasureSize: number,
 parentHeightMeasureMode: number
): void
Parameter Default Description
parentWidthMeasureSize
number
parentWidthMeasureMode
number
parentHeightMeasureSize
number
parentHeightMeasureMode
number
Returns void

_updateStyleScope ​

_updateStyleScope(
 cssFileName?: string,
 cssString?: string,
 css?: string
): void
Parameter Default Description
cssFileName
string
cssString
string
css
string
Returns void

accessibilityAnnouncement ​

accessibilityAnnouncement(msg?: string): void
Parameter Default Description
msg
string
Returns void

accessibilityScreenChanged ​

accessibilityScreenChanged(): void

addCss ​

addCss(cssString: string): void
Parameter Default Description
cssString
string
Returns void

addCssFile ​

addCssFile(cssFileName: string): void
Parameter Default Description
cssFileName
string
Returns void

addEventListener ​

addEventListener(arg: string | GestureTypes, callback: (data: EventData) => void, thisArg?: any): void
Parameter Default Description
arg
string | GestureTypes
callback
(data: EventData) => void
thisArg
any
Returns void

animate ​

animate(animation: any): AnimationPromise
Parameter Default Description
animation
any
Returns AnimationPromise

changeCssFile ​

changeCssFile(cssFileName: string): void
Parameter Default Description
cssFileName
string
Returns void

closeModal ​

closeModal(...args: any[]): void
Parameter Default Description
args
any[]
Returns void

createAnimation ​

createAnimation(animation: any): Animation 
Parameter Default Description
animation
any
Returns Animation

eachChild ​

eachChild(callback: (child: ViewBase) => boolean): void
Parameter Default Description
callback
(child: ViewBase) => boolean
Returns void

eachChildView ​

eachChildView(callback: (view: View) => boolean): void
Parameter Default Description
callback
(view: View) => boolean
Returns void

focus ​

focus(): boolean

getActualSize ​

getGestureObservers ​

getGestureObservers(type: GestureTypes): GesturesObserver[]
Parameter Default Description
Returns GesturesObserver[]

getLocationInWindow ​

getLocationInWindow(): Point

getLocationOnScreen ​

getLocationOnScreen(): Point

getLocationRelativeTo ​

getLocationRelativeTo(otherView: View): Point
Parameter Default Description
otherView
Returns Point

getMeasuredHeight ​

getMeasuredHeight(): number

getMeasuredState ​

getMeasuredState(): number

getMeasuredWidth ​

getMeasuredWidth(): number

getSafeAreaInsets ​

getSafeAreaInsets(): {
 bottom: any
 left: any
 right: any
}
Returns { bottom: any left: any right: any }

layout ​

layout(left: number, top: number, right: number, bottom: number): void
Parameter Default Description
left
number
top
number
right
number
bottom
number
Returns void

layoutNativeView ​

Abstract
layoutNativeView(
 left: number,
 top: number,
 right: number,
 bottom: number
): void
Parameter Default Description
left
number
top
number
right
number
bottom
number
Returns void

measure ​

measure(widthMeasureSpec: number, heightMeasureSpec: number): void
Parameter Default Description
widthMeasureSpec
number
heightMeasureSpec
number
Returns void

onBackPressed ​

onBackPressed(): boolean

onLayout ​

Abstract
onLayout(left: number, top: number, right: number, bottom: number): void
Parameter Default Description
left
number
top
number
right
number
bottom
number
Returns void

onLoaded ​

onLoaded(): void

onMeasure ​

Abstract
onMeasure(widthMeasureSpec: number, heightMeasureSpec: number): void
Parameter Default Description
widthMeasureSpec
number
heightMeasureSpec
number
Returns void

removeEventListener ​

removeEventListener(arg: string | GestureTypes, callback?: (data: EventData) => void, thisArg?: any): void
Parameter Default Description
arg
string | GestureTypes
callback
(data: EventData) => void
thisArg
any
Returns void

requestLayout ​

requestLayout(): void

resetNativeView ​

resetNativeView(): void

sendAccessibilityEvent ​

sendAccessibilityEvent(options: Partial<AccessibilityEventOptions>): void
Parameter Default Description
options
Partial<AccessibilityEventOptions>
Returns void

setMeasuredDimension ​

setMeasuredDimension(measuredWidth: number, measuredHeight: number): void
Parameter Default Description
measuredWidth
number
measuredHeight
number
Returns void

setTestID ​

setTestID(view: any, value: string): void
Parameter Default Description
view
any
value
string
Returns void

showModal ​

showModal(...args: any[]): View 
Parameter Default Description
args
any[]
Returns View

combineMeasuredStates ​

Static
combineMeasuredStates(curState: number, newState: any): number
Parameter Default Description
curState
number
newState
any
Returns number

layoutChild ​

Static
layoutChild(parent: View, child: View, left: number, top: number, right: number, bottom: number, setFrame?: boolean): void
Parameter Default Description
parent
child
left
number
top
number
right
number
bottom
number
setFrame
boolean
Returns void

measureChild ​

Static
measureChild(parent: ViewCommon, child: ViewCommon, widthMeasureSpec: number, heightMeasureSpec: number): {
 measuredHeight: number
}
Parameter Default Description
parent
child
widthMeasureSpec
number
heightMeasureSpec
number
Returns { measuredHeight: number }

resolveSizeAndState ​

Static
resolveSizeAndState(
 size: number,
 specSize: number,
 specMode: number,
 childMeasuredState: number
): number
Parameter Default Description
size
number
specSize
number
specMode
number
childMeasuredState
number
Returns number
Previous
ViewBase
On this page
  1. Summary
  2. Constructors
    1. constructor
  3. Properties
    1. _androidContentDescriptionUpdated
    2. _closeModalCallback
    3. _currentHeightMeasureSpec
    4. _currentWidthMeasureSpec
    5. _gestureObservers
    6. _isLayoutValid
    7. _manager
    8. _modalParent
    9. _setMinHeightNative
    10. _setMinWidthNative
    11. accessibilityHint
    12. accessibilityIdentifier
    13. accessibilityLabel
    14. accessibilityValue
    15. ignoreTouchAnimation
    16. iosIgnoreSafeArea
    17. iosOverflowSafeArea
    18. iosOverflowSafeAreaEnabled
    19. isEnabled
    20. isUserInteractionEnabled
    21. originX
    22. originY
    23. testID
    24. touchAnimation
    25. touchDelay
    26. transitionId
    27. accessibilityBlurEvent
    28. accessibilityFocusChangedEvent
    29. accessibilityFocusEvent
    30. accessibilityPerformEscapeEvent
    31. layoutChangedEvent
    32. showingModallyEvent
    33. shownModallyEvent
  4. Accessors
    1. accessibilityHidden
    2. accessibilityLanguage
    3. accessibilityLiveRegion
    4. accessibilityMediaSession
    5. accessibilityRole
    6. accessibilityState
    7. accessible
    8. androidDynamicElevationOffset
    9. androidElevation
    10. automationText
    11. background
    12. backgroundColor
    13. backgroundImage
    14. backgroundPosition
    15. backgroundRepeat
    16. backgroundSize
    17. borderBottomColor
    18. borderBottomLeftRadius
    19. borderBottomRightRadius
    20. borderBottomWidth
    21. borderColor
    22. borderLeftColor
    23. borderLeftWidth
    24. borderRadius
    25. borderRightColor
    26. borderRightWidth
    27. borderTopColor
    28. borderTopLeftRadius
    29. borderTopRightRadius
    30. borderTopWidth
    31. borderWidth
    32. boxShadow
    33. color
    34. css
    35. cssType
    36. height
    37. horizontalAlignment
    38. iosAccessibilityAdjustsFontSize
    39. iosAccessibilityMaxFontScale
    40. iosAccessibilityMinFontScale
    41. isLayoutRequired
    42. isLayoutValid
    43. margin
    44. marginBottom
    45. marginLeft
    46. marginRight
    47. marginTop
    48. minHeight
    49. minWidth
    50. modal
    51. opacity
    52. perspective
    53. rotate
    54. rotateX
    55. rotateY
    56. scaleX
    57. scaleY
    58. textTransform
    59. translateX
    60. translateY
    61. verticalAlignment
    62. visibility
    63. width
  5. Methods
    1. _applyBackground
    2. _closeAllModalViewsInternal
    3. _eachLayoutView
    4. _getCurrentLayoutBounds
    5. _getFragmentManager
    6. _getNativeViewsCount
    7. _getRootModalViews
    8. _getValue
    9. _handleLivesync
    10. _hasAncestorView
    11. _hideNativeModalView
    12. _observe
    13. _onAttachedToWindow
    14. _onDetachedFromWindow
    15. _onLivesync
    16. _raiseLayoutChangedEvent
    17. _raiseShowingModallyEvent
    18. _raiseShownModallyEvent
    19. _redrawNativeBackground
    20. _removeAnimation
    21. _setCurrentLayoutBounds
    22. _setCurrentMeasureSpecs
    23. _setNativeClipToBounds
    24. _setNativeViewFrame
    25. _setValue
    26. _setupAsRootView
    27. _showNativeModalView
    28. _updateEffectiveLayoutValues
    29. _updateStyleScope
    30. accessibilityAnnouncement
    31. accessibilityScreenChanged
    32. addCss
    33. addCssFile
    34. addEventListener
    35. animate
    36. changeCssFile
    37. closeModal
    38. createAnimation
    39. eachChild
    40. eachChildView
    41. focus
    42. getActualSize
    43. getGestureObservers
    44. getLocationInWindow
    45. getLocationOnScreen
    46. getLocationRelativeTo
    47. getMeasuredHeight
    48. getMeasuredState
    49. getMeasuredWidth
    50. getSafeAreaInsets
    51. layout
    52. layoutNativeView
    53. measure
    54. onBackPressed
    55. onLayout
    56. onLoaded
    57. onMeasure
    58. removeEventListener
    59. requestLayout
    60. resetNativeView
    61. sendAccessibilityEvent
    62. setMeasuredDimension
    63. setTestID
    64. showModal
    65. combineMeasuredStates
    66. layoutChild
    67. measureChild
    68. resolveSizeAndState

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /