Note: You are on the beta version of our docs. This is a work in progress and may contain broken links and pages.
Classes
ViewBase
Summary
Constructors
Properties
- _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
- recycleNativeView
- reusable
- row
- rowSpan
- sharedTransitionIgnore
- sharedTransitionTag
- top
- unloadedEvent
- viewController
1 properties inherited from Observable
Click to expand
Methods
- _addView
- _addViewCore
- _addViewToNativeVisualTree
- _applyXmlAttribute
- _batchUpdate
- _childIndexToNativeChildIndex
- _dialogClosed
- _goToVisualState
- _inheritStyleScope
- _layoutParent
- _onRootViewReset
- _parentChanged
- _removeView
- _removeViewCore
- _removeViewFromNativeVisualTree
- _resumeNativeUpdates
- _setupAsRootView
- _setupUI
- _shouldDelayLayout
- _suspendNativeUpdates
- _tearDownUI
- addPseudoClass
- bind
- callLoaded
- callUnloaded
- closeModal
- createNativeView
- deletePseudoClass
- destroyNode
- disposeNativeView
- eachChild
- ensureDomNode
- getViewByDomId
- getViewById
- initNativeView
- loadView
- onLoaded
- onResumeNativeUpdates
- onUnloaded
- requestLayout
- resetNativeView
- set
- setInlineStyle
- setNativeView
- showModal
- toString
- unbind
- unloadView
17 methods inherited from Observable
Click to expand
Constructors
Properties
_automaticallyAdjustsScrollViewInsets
_context
_cssState
_defaultPaddingBottom
_defaultPaddingLeft
_defaultPaddingRight
_defaultPaddingTop
_domId
_ignoreFlexMinWidthHeightReset
_isAddedToNativeVisualTree
_isPaddingRelative
_isStyleScopeHost
_oldBottom
_oldLeft
_oldRight
_oldTop
_styleScope
_suspendNativeUpdatesCount
Determines the depth of suspended updates.
When the value is 0 the current property updates are not batched nor scoped and must be immediately applied.
If the value is 1 or greater, the current updates are batched and does not have to provide immediate update.
Do not set this field, the _batchUpdate method is responsible to keep the count up to date,
as well as adding/rmoving the view to/from the visual tree.
alignSelf
bindingContext
className
Gets or sets the CSS class name for this view.
col
colSpan
column
columnSpan
cssClasses
cssPseudoClasses
dock
domNode
effectiveBorderBottomWidth
effectiveBorderLeftWidth
effectiveBorderRightWidth
effectiveBorderTopWidth
effectiveHeight
effectiveLeft
effectiveMarginBottom
effectiveMarginLeft
effectiveMarginRight
effectiveMarginTop
effectiveMinHeight
effectiveMinWidth
effectivePaddingBottom
effectivePaddingLeft
effectivePaddingRight
effectivePaddingTop
effectiveTop
effectiveWidth
flexGrow
flexShrink
flexWrapBefore
id
Gets or sets the id for this view.
isCollapsed
Returns true if visibility is set to 'collapse'.
Default(false) set in prototype
Readonly property
left
left: LengthType
nativeViewProtected
read-only. If you want to set out-of-band the nativeView use the setNativeView method.
order
recycleNativeView
reusable
Gets or sets if the view is reusable.
Reusable views are not automatically destroyed when removed from the View tree.
row
rowSpan
sharedTransitionIgnore
Opt out of shared transition under different binding conditions
sharedTransitionTag
Gets or sets the shared transition tag for animated view transitions
top
top: LengthType
viewController
returns the native UIViewController.
createdEvent
Static
String value used when hooking to creation event
disposeNativeViewEvent
Static
String value used when hooking to disposeNativeView event
loadedEvent
Static
String value used when hooking to loaded event.
unloadedEvent
Static
String value used when hooking to unloaded event.
Accessors
android
Returns any
class
Returns string
ios
Returns any
isLoaded
Returns boolean
nativeView
Returns any
parentNode
typeName
Gets the name of the constructor function for this instance. E.g. for a Button class this will return "Button".
Returns string
Methods
_addView
_addView(view: ViewBase, atIndex?: number): void
Parameter | Default | Description |
view |
| |
atIndex |
| number |
Returns void
_addViewCore
_addViewCore(view: ViewBase, atIndex?: number): void
Method is intended to be overridden by inheritors and used as "protected"
Parameter | Default | Description |
view |
| |
atIndex |
| number |
Returns void
_addViewToNativeVisualTree
_addViewToNativeVisualTree(view: ViewBase, atIndex?: number): boolean
Performs the core logic of adding a child view to the native visual tree. Returns true if the view's native representation has been successfully added, false otherwise.
Method is intended to be overridden by inheritors and used as "protected".
Parameter | Default | Description |
view |
| |
atIndex |
| number |
Returns boolean
_applyXmlAttribute
Parameter | Default | Description |
attribute |
| string |
value |
| string |
Returns boolean
_batchUpdate
Allow multiple updates to be performed on the instance at once.
Parameter | Default | Description |
callback |
| () => T |
Returns T
_childIndexToNativeChildIndex
Parameter | Default | Description |
index |
| number |
Returns number
_dialogClosed
Method is intended to be overridden by inheritors and used as "protected"
Returns void
_goToVisualState
Parameter | Default | Description |
state |
| string |
Returns void
_inheritStyleScope
Parameter | Default | Description |
styleScope |
| StyleScope |
Returns void
_layoutParent
Returns void
_onRootViewReset
Method is intended to be overridden by inheritors and used as "protected"
Returns void
_parentChanged
_parentChanged(oldParent: ViewBase): void
Parameter | Default | Description |
oldParent |
|
Returns void
_removeView
_removeView(view: ViewBase): void
Core logic for removing a child view from this instance. Used by the framework to handle lifecycle events more centralized. Do not use outside the UI Stack implementation.
Parameter | Default | Description |
view |
|
Returns void
_removeViewCore
_removeViewCore(view: ViewBase): void
Method is intended to be overridden by inheritors and used as "protected"
Parameter | Default | Description |
view |
|
Returns void
_removeViewFromNativeVisualTree
_removeViewFromNativeVisualTree(view: ViewBase): void
Method is intended to be overridden by inheritors and used as "protected"
Parameter | Default | Description |
view |
|
Returns void
_resumeNativeUpdates
Parameter | Default | Description |
type |
| SuspendType |
Returns void
_setupAsRootView
Parameter | Default | Description |
context |
| any |
Returns void
_setupUI
Setups the UI for ViewBase and all its children recursively.
This method should *not* be overridden by derived views.
Parameter | Default | Description |
context |
| any |
atIndex |
| number |
parentIsLoaded |
| boolean |
Returns void
_shouldDelayLayout
When returning true the callLoaded method will be run in setTimeout
Method is intended to be overridden by inheritors and used as "protected"
Returns boolean
_suspendNativeUpdates
Parameter | Default | Description |
type |
| SuspendType |
Returns void
_tearDownUI
Tears down the UI for ViewBase and all its children recursively.
This method should *not* be overridden by derived views.
Parameter | Default | Description |
force |
| boolean |
Returns void
addPseudoClass
Protected
Parameter | Default | Description |
name |
| string |
Returns void
bind
bind(options: BindingOptions, source?: Object): void
Parameter | Default | Description |
options |
| |
source |
| Object |
Returns void
callLoaded
Returns void
callUnloaded
Returns void
closeModal
Closes the current modal view that this page is showing.
Parameter | Default | Description |
args |
| any[] |
Returns void
createNativeView
Creates a native view.
Returns either android.view.View or UIView.
Returns Object
deletePseudoClass
Protected
Parameter | Default | Description |
name |
| string |
Returns void
destroyNode
Tears down the UI of a reusable node by making it no longer reusable.
Parameter | Default | Description |
forceDestroyChildren |
| boolean Force destroy the children (even if they are reusable) |
Returns void
disposeNativeView
Clean up references to the native view.
Returns void
eachChild
ensureDomNode
Returns void
getViewByDomId
Returns the child view with the specified domId.
Parameter | Default | Description |
domId |
| number |
Returns T
getViewById
Returns the child view with the specified id.
Parameter | Default | Description |
id |
| string |
Returns T
initNativeView
Initializes properties/listeners of the native view.
Returns void
loadView
loadView(view: ViewBase): void
Load view.
Parameter | Default | Description |
view |
| to load. |
Returns void
onLoaded
Returns void
onResumeNativeUpdates
Returns void
onUnloaded
Returns void
requestLayout
Invalidates the layout of the view and triggers a new layout pass.
Returns void
resetNativeView
Resets properties/listeners set to the native view.
Returns void
set
Parameter | Default | Description |
name |
| string |
value |
| any |
Returns void
setInlineStyle
Parameter | Default | Description |
style |
| string |
Returns void
setNativeView
Set the nativeView field performing extra checks and updates to the native properties on the new view.
Use in cases where the createNativeView is not suitable.
As an example use in item controls where the native parent view will create the native views for child items.
Parameter | Default | Description |
value |
| any |
Returns void
showModal
showModal(view: ViewBase, modalOptions?: ShowModalOptions): ViewBase
Shows the view passed as parameter as a modal view.
Parameter | Default | Description |
view |
| View instance to be shown modally. |
modalOptions |
| A ShowModalOptions instance |
Returns ViewBase
showModal(moduleName: string, modalOptions?: ShowModalOptions): ViewBase
Shows the View contained in moduleName as a modal view.
Parameter | Default | Description |
moduleName |
| string The name of the module to load starting from the application root. |
modalOptions |
| A ShowModalOptions instance |
Returns ViewBase
toString
Returns string
unbind
Parameter | Default | Description |
property |
| string |
Returns void
- Previous
- View
- Next
- ViewCommon