Preview 2.0 is now in Public Beta!
Read the Announcement

Summary

Constructors

constructor

Properties

_androidContentDescriptionUpdated
_currentHeightMeasureSpec
_currentWidthMeasureSpec
_gestureObservers
_manager
_modalParent
accessibilityBlurEvent
accessibilityFocusChangedEvent
accessibilityFocusEvent
accessibilityHidden
accessibilityHint
accessibilityIdentifier
accessibilityLabel
accessibilityLanguage
accessibilityLiveRegion
accessibilityMediaSession
accessibilityRole
accessibilityState
accessibilityValue
accessible
android
androidDynamicElevationOffset
androidElevation
automationText
background
backgroundColor
backgroundImage
bindingContext
borderBottomColor
borderBottomLeftRadius
borderBottomRightRadius
borderBottomWidth
borderColor
borderLeftColor
borderLeftWidth
borderRadius
borderRightColor
borderRightWidth
borderTopColor
borderTopLeftRadius
borderTopRightRadius
borderTopWidth
borderWidth
boxShadow
color
css
cssClasses
cssPseudoClasses
cssType
height
horizontalAlignment
ios
iosIgnoreSafeArea
iosOverflowSafeArea
iosOverflowSafeAreaEnabled
isEnabled
isLayoutRequired
isLayoutValid
isUserInteractionEnabled
layoutChangedEvent
margin
marginBottom
marginLeft
marginRight
marginTop
minHeight
minWidth
modal
opacity
originX
originY
perspective
rotate
rotateX
rotateY
scaleX
scaleY
showingModallyEvent
shownModallyEvent
translateX
translateY
verticalAlignment
visibility
width

Methods

_applyBackground
_closeAllModalViewsInternal
_eachLayoutView
_getCurrentLayoutBounds
_getFragmentManager
_getNativeViewsCount
_getRootModalViews
_getValue
_goToVisualState
_handleLivesync
_hasAncestorView
_onAttachedToWindow
_onDetachedFromWindow
_onLivesync
_onSizeChanged
_redrawNativeBackground
_removeAnimation
_setCurrentLayoutBounds
_setCurrentMeasureSpecs
_setMinHeightNative
_setMinWidthNative
_setNativeClipToBounds
_setNativeViewFrame
_setValue
_updateEffectiveLayoutValues
_updateStyleScope
accessibilityAnnouncement
accessibilityScreenChanged
addCss
addCssFile
animate
changeCssFile
combineMeasuredStates
createAnimation
eachChildView
focus
getActualSize
getGestureObservers
getLocationInWindow
getLocationOnScreen
getLocationRelativeTo
getMeasuredHeight
getMeasuredState
getMeasuredWidth
getSafeAreaInsets
hasGestureObservers
layout
layoutChild
layoutNativeView
measure
measureChild
off
on
onBackPressed
onLayout
onMeasure
resolveSizeAndState
sendAccessibilityEvent
setMeasuredDimension
setOnTouchListener

Constructors

constructor

new View(): View
Returns View

Properties

_androidContentDescriptionUpdated

_androidContentDescriptionUpdated?: boolean

_currentHeightMeasureSpec

Private
_currentHeightMeasureSpec: number

_currentWidthMeasureSpec

Private
_currentWidthMeasureSpec: number

_gestureObservers

Private
_gestureObservers: any

_manager

Private

_modalParent

Private

accessibilityHidden

accessibilityHidden: boolean

accessibilityHint

accessibilityHint: string

accessibilityIdentifier

accessibilityIdentifier: string

accessibilityLabel

accessibilityLabel: string

accessibilityLanguage

accessibilityLanguage: string

accessibilityLiveRegion

accessibilityMediaSession

accessibilityMediaSession: boolean

accessibilityRole

accessibilityState

accessibilityValue

accessibilityValue: string

accessible

androidDynamicElevationOffset

androidDynamicElevationOffset: number

androidElevation

androidElevation: number

automationText

automationText: string

background

backgroundColor

backgroundColor: string | Color

backgroundImage

backgroundImage: string | LinearGradient

bindingContext

borderBottomColor

borderBottomLeftRadius

borderBottomRightRadius

borderBottomWidth

borderColor

borderLeftColor

borderLeftWidth

borderRadius

borderRightColor

borderRightWidth

borderTopColor

borderTopLeftRadius

borderTopRightRadius

borderTopWidth

borderWidth

boxShadow

boxShadow: string | CSSShadow

css

Private

cssClasses

cssClasses: Set<string>

cssPseudoClasses

cssPseudoClasses: Set<string>

cssType

horizontalAlignment

iosIgnoreSafeArea

iosIgnoreSafeArea: boolean

iosOverflowSafeArea

iosOverflowSafeArea: boolean

iosOverflowSafeAreaEnabled

iosOverflowSafeAreaEnabled: boolean

isEnabled

isLayoutRequired

Private
isLayoutRequired: boolean

isLayoutValid

isLayoutValid: boolean

isUserInteractionEnabled

isUserInteractionEnabled: boolean

opacity

originX

originY

perspective

rotate

rotateX

rotateY

scaleX

scaleY

translateX

translateY

verticalAlignment

accessibilityBlurEvent

Static
accessibilityBlurEvent: string

accessibilityFocusChangedEvent

Static
accessibilityFocusChangedEvent: string

accessibilityFocusEvent

Static
accessibilityFocusEvent: string

layoutChangedEvent

Static
layoutChangedEvent: string

showingModallyEvent

Static
showingModallyEvent: string

shownModallyEvent

Static
shownModallyEvent: string

Methods

_applyBackground

Private
_applyBackground(
  background: Background,
  isBorderDrawable: boolean,
  onlyColor: boolean,
  backgroundDrawable: any
): any
Parameter Default Description
background
Background

isBorderDrawable
boolean

onlyColor
boolean

backgroundDrawable
any

Returns any

_closeAllModalViewsInternal

_closeAllModalViewsInternal(): boolean

_eachLayoutView

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

Returns void

_getCurrentLayoutBounds

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

_getFragmentManager

Private
_getFragmentManager(): any

_getNativeViewsCount

_getNativeViewsCount(): number

_getRootModalViews

_getRootModalViews(): ViewBase[]

_getValue

_getValue(property: any): never
Parameter Default Description
property
any

Returns never

_goToVisualState

Private
_goToVisualState(state: string): any
Parameter Default Description
state
string

Returns any

_handleLivesync

_handleLivesync(context?: { path: string }): boolean
Parameter Default Description
context
{ path: string }

Returns boolean

_hasAncestorView

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

Returns boolean

_onAttachedToWindow

_onAttachedToWindow(): void

_onDetachedFromWindow

_onDetachedFromWindow(): void

_onLivesync

Private
_onLivesync(context?: { path: string }): boolean
Parameter Default Description
context
{ path: string }

Returns boolean

_onSizeChanged

_onSizeChanged(): void

_redrawNativeBackground

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

Returns void

_removeAnimation

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

Returns boolean

_setCurrentLayoutBounds

Private
_setCurrentLayoutBounds(
  left: number,
  top: number,
  right: number,
  bottom: number
): {
  boundsChanged: boolean
}
Parameter Default Description
left
number

top
number

right
number

bottom
number

Returns { boundsChanged: boolean }

_setCurrentMeasureSpecs

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

heightMeasureSpec
number

Returns boolean

_setMinHeightNative

Private
_setMinHeightNative(value: LengthType): void
Parameter Default Description
value

Returns void

_setMinWidthNative

Private
_setMinWidthNative(value: LengthType): void
Parameter Default Description
value

Returns void

_setNativeClipToBounds

Private
_setNativeClipToBounds(): void

_setNativeViewFrame

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

frame
any

Returns void

_setValue

_setValue(property: any, value: any): never
Parameter Default Description
property
any

value
any

Returns never

_updateEffectiveLayoutValues

Private
_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

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

Returns void

addCssFile

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

Returns void

animate

animate(options: AnimationDefinition): AnimationPromise
Parameter Default Description
options

Returns AnimationPromise

changeCssFile

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

Returns void

createAnimation

createAnimation(options: AnimationDefinition): Animation
Parameter Default Description
options

Returns Animation

eachChildView

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

Returns void

focus

focus(): boolean

getActualSize

getActualSize(): Size

getGestureObservers

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

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 }

hasGestureObservers

hasGestureObservers(): boolean

layout

layout(
  left: number,
  top: number,
  right: number,
  bottom: number,
  setFrame?: boolean
): void
Parameter Default Description
left
number

top
number

right
number

bottom
number

setFrame
boolean

Returns void

layoutNativeView

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

off

off(eventNames: string | GestureTypes, callback?: (args: EventData) => void, thisArg?: any): any
Parameter Default Description
eventNames
string | GestureTypes

callback
(args: EventData) => void

thisArg
any

Returns any

on

on(eventNames: string | GestureTypes, callback: (args: EventData) => void, thisArg?: any): any
Parameter Default Description
eventNames
string | GestureTypes

callback
(args: EventData) => void

thisArg
any

Returns any
on(event: "loaded", callback: (args: EventData) => void, thisArg?: any): any
Parameter Default Description
event
"loaded"

callback
(args: EventData) => void

thisArg
any

Returns any
on(event: "unloaded", callback: (args: EventData) => void, thisArg?: any): any
Parameter Default Description
event
"unloaded"

callback
(args: EventData) => void

thisArg
any

Returns any
on(event: "androidBackPressed", callback: (args: EventData) => void, thisArg?: any): any
Parameter Default Description
event
"androidBackPressed"

callback
(args: EventData) => void

thisArg
any

Returns any
on(event: "showingModally", callback: (args: ShownModallyData) => void, thisArg?: any): void
Parameter Default Description
event
"showingModally"

callback
(args: ShownModallyData) => void

thisArg
any

Returns void
on(event: "shownModally", callback: (args: ShownModallyData) => void, thisArg?: any): any
Parameter Default Description
event
"shownModally"

callback
(args: ShownModallyData) => void

thisArg
any

Returns any

onBackPressed

onBackPressed(): boolean

onLayout

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

top
number

right
number

bottom
number

Returns void

onMeasure

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

heightMeasureSpec
number

Returns 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

setOnTouchListener

setOnTouchListener(): void

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): void
Parameter Default Description
parent

child

left
number

top
number

right
number

bottom
number

Returns void

measureChild

Static
measureChild(parent: View, child: View, 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
Transition