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.
A property bag holding suspended native updates. Native setters that had to execute while there was no native view, or the view was detached from the visual tree etc. will accumulate in this object, and will be applied when all prerequisites are met.
Gets the android-specific native instance that lies behind this proxy. Will be available if running on an Android platform.
Gets or sets the dynamic elevation offset of the android view.
Gets or sets the elevation of the android view.
Gets or sets the automation text of the view.
Gets or sets the background style property.
Gets or sets the background color of the view.
Gets or sets the background image of the view.
Gets or sets the binding context of this instance. This object is used as a source for each Binding that does not have a source object specified.
Gets or sets the bottom border color of the view.
Gets or sets the bottom left border radius of the view.
Gets or sets the bottom right border radius of the view.
Gets or sets the bottom border width of the view.
Gets or sets the border color of the view.
Gets or sets the left border color of the view.
Gets or sets the left border width of the view.
Gets or sets the border radius of the view.
Gets or sets the right border color of the view.
Gets or sets the right border width of the view.
Gets or sets the top border color of the view.
Gets or sets the top left border radius of the view.
Gets or sets the top right border radius of the view.
Gets or sets the top border width of the view.
Gets or sets the border width of the view.
Gets or sets the CSS class name for this view.
Gets or sets the color of the view.
Setting column
property is the same as
col
Setting columnSpan
property is the same as
colSpan
Gets the CSS fully qualified type name. Using this as element type should allow for PascalCase and kebap-case selectors, when fully qualified, to match the element.
Gets or sets the desired height of the view.
Gets or sets the alignment of this view within its parent along the Horizontal axis.
Gets or sets the id for this view.
Gets the ios-specific native instance that lies behind this proxy. Will be available if running on an iOS platform.
Gets or sets a value indicating whether the the view should totally ignore safe areas computation. This property is iOS specific. Default value: false
Instruct container view to expand beyond the safe area. This property is iOS specific. Default value: false
Enables or disables the iosOverflowSafeArea property for all children. This property is iOS specific. Default value: true
Returns true if visibility is set to 'collapse'. Readonly property
Gets or sets a value indicating whether the the view is enabled. This affects the appearance of the view.
Gets is layout is valid. This is a read-only property.
Gets or sets a value indicating whether the user can interact with the view. This does not affect the appearance of the view.
Gets or sets margin style property.
Specifies extra space on the bottom side of this view.
Specifies extra space on the left side of this view.
Specifies extra space on the right side of this view.
Specifies extra space on the top side of this view.
Gets or sets the minimum height the view may grow to.
Gets or sets the minimum width the view may grow to.
Returns the current modal view that this page is showing (is parent of), if any.
read-only. If you want to set out-of-band the nativeView use the setNativeView method.
Gets or sets the opacity style property.
Gets or sets the X component of the origin point around which the view will be transformed. The default value is 0.5 representing the center of the view.
Gets or sets the Y component of the origin point around which the view will be transformed. The default value is 0.5 representing the center of the view.
Gets owner page. This is a read-only property.
Gets the parent view. This property is read-only.
Gets or sets the distance of the camera form the view perspective. Usually needed when rotating the view over the X or Y axis.
Gets or sets the rotate affine transform of the view along the Z axis.
Gets or sets the rotate affine transform of the view along the X axis.
Gets or sets the rotate affine transform of the view along the Y axis.
Gets or sets the scaleX affine transform of the view.
Gets or sets the scaleY affine transform of the view.
Gets the style object associated to this view.
Gets or sets the translateX affine transform of the view in device independent pixels.
Gets or sets the translateY affine transform of the view in device independent pixels.
Gets the name of the constructor function for this instance. E.g. for a Button class this will return "Button".
Gets or sets the alignment of this view within its parent along the Vertical axis.
returns the native UIViewController.
Gets or sets the visibility of the view.
Gets or sets the desired width of the view.
String value used when hooking to layoutChanged event.
String value used when hooking to loaded event.
String value used when hooking to propertyChange event.
String value used when hooking to showingModally event.
String value used when hooking to shownModally event.
String value used when hooking to unloaded event.
Method is intended to be overridden by inheritors and used as "protected"
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.
Allow multiple updates to be performed on the instance at once.
Internal method: Closes all modal views. Should be used
by plugins like nativescript-angular
which
implement their own modal views
service.
This method is intended to be overriden by inheritors to provide additional implementation.
Method is intended to be overridden by inheritors and used as "protected"
Return view bounds.
Internal method: Gets all modal views of the current view.
Obsolete: There is a new property system that does not rely on _getValue.
Checks whether the current view has specific view for an ancestor.
Called in android when native view is attached to window.
Called in android when native view is dettached from window.
Method is intended to be overridden by inheritors and used as "protected"
iOS Only Internal method used to update various view details like background rerendering, border, etc.
Method is intended to be overridden by inheritors and used as "protected"
Called by layout method to cache view bounds.
Called by measure method to cache measureSpecs.
Obsolete: There is a new property system that does not rely on _setValue.
Setups the UI for ViewBase and all its children recursively. This method should not be overridden by derived views.
When returning true the callLoaded method will be run in setTimeout Method is intended to be overridden by inheritors and used as "protected"
Tears down the UI for ViewBase and all its children recursively. This method should not be overridden by derived views.
Updates styleScope or create new styleScope.
A valid css which will be added to current css.
A valid file name (from the application root) which contains a valid css.
Adds a listener for the specified event name.
Comma delimited names of the events to attach the listener to.
A function to be called when some of the specified event(s) is raised.
An optional parameter which when set will be used as "this" in callback method call.
Animates one or more properties of the view based on the supplied options.
A valid file name (from the application root) which contains a valid css.
Closes the current modal view that this page is showing.
Any context you want to pass back to the host when closing the modal view.
Creates an Animation object based on the supplied options.
Creates a native view. Returns either android.view.View or UIView.
Clean up references to the native view.
Iterates over children of type ViewBase.
Called for each child of type ViewBase. Iteration stops if this method returns falsy value.
Iterates over children of type View.
Called for each child of type View. Iteration stops if this method returns falsy value.
Tries to focus the view. Returns a value indicating whether this view or one of its descendants actually took focus.
Gets the value of the specified property.
Returns the actual size of the view in device-independent pixels.
Returns the location of this view in the window coordinate system.
Returns the location of this view in the screen coordinate system.
Returns the location of this view in the otherView's coordinate system.
Returns the raw height component.
Returns the raw width component.
Returns the iOS safe area insets of this view.
Returns the child view with the specified id.
Android only check if gesture observers are attached
Checks whether a listener is registered for the specified event name.
The name of the event to check for.
Initializes properties/listeners of the native view.
Assign a size and position to a view and all of its descendants This is the second phase of the layout mechanism. (The first is measuring). In this phase, each parent calls layout on all of its children to position them. This is typically done using the child measurements that were stored in the measure pass(). Derived classes should not override this method. Derived classes with children should override onLayout. In that method, they should call layout on each of their children.
Called from onLayout when native view position is about to be changed.
Left position, relative to parent
Top position, relative to parent
Right position, relative to parent
Bottom position, relative to parent
Load view.
to load.
This is called to find out how big a view should be. The parent supplies constraint information in the width and height parameters. The actual measurement work of a view is performed in onMeasure(int, int), called by this method. Therefore, only onMeasure(int, int) can and must be overridden by subclasses.
Horizontal space requirements as imposed by the parent
Vertical space requirements as imposed by the parent
Notifies all the registered listeners for the event provided in the data.eventName.
The data associated with the event.
Notifies all the registered listeners for the property change event.
Removes listener(s) for the specified event name.
Comma delimited names of the events or gesture types the specified listener is associated with.
An optional parameter pointing to a specific listener. If not defined, all listeners for the event names will be removed.
An optional parameter which when set will be used to refine search of the correct callback which will be removed as event listener.
A basic method signature to hook an event listener (shortcut alias to the addEventListener method).
String corresponding to events (e.g.
"propertyChange"). Optionally could be used
more events separated by ,
(e.g.
"propertyChange", "change") or you
can use gesture types.
Callback function which will be executed when event is raised.
An optional parameter which will be used as
this
context for callback execution.
Raised when a loaded event occurs.
Raised when an unloaded event occurs.
Raised when a back button is pressed. This event is raised only for android.
Raised before the view is shown as a modal dialog.
Raised after the view is shown as a modal dialog.
Derived classes can override this method to handle Android back button press.
Called from layout when this view should assign a size and position to each of its children. Derived classes with children should override this method and call layout on each of their children.
Left position, relative to parent
Top position, relative to parent
Right position, relative to parent
Bottom position, relative to parent
Measure the view and its content to determine the measured width and the measured height. This method is invoked by measure(int, int) and should be overriden by subclasses to provide accurate and efficient measurement of their contents. When overriding this method, you must call setMeasuredDimension(int, int) to store the measured width and height of this view. Failure to do so will trigger an exception, thrown by measure(int, int).
horizontal space requirements as imposed by the parent. The requirements are encoded with View.MeasureSpec.
vertical space requirements as imposed by the parent. The requirements are encoded with View.MeasureSpec.
Adds one-time listener function for the event named
event
.
Name of the event to attach to.
A function to be called when the specified event is raised.
An optional parameter which when set will be used as "this" in callback method call.
Removes listener(s) for the specified event name.
Comma delimited names of the events the specified listener is associated with.
An optional parameter pointing to a specific listener. If not defined, all listeners for the event names will be removed.
An optional parameter which when set will be used to refine search of the correct callback which will be removed as event listener.
Invalidates the layout of the view and triggers a new layout pass.
Resets properties/listeners set to the native view.
Updates the specified property with the provided value.
This method must be called by onMeasure(int, int) to store the measured width and measured height. Failing to do so will trigger an exception at measurement time.
The measured width of this view. May be a complex bit mask as defined by MEASURED_SIZE_MASK and MEASURED_STATE_TOO_SMALL.
The measured height of this view. May be a complex bit mask as defined by MEASURED_SIZE_MASK and MEASURED_STATE_TOO_SMALL.
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.
Android only to set the touch listener
Updates the specified property with the provided value and raises a property change event and a specific change event based on the property name.
Shows the View contained in moduleName as a modal view.
The name of the module to load starting from the application root.
A ShowModalOptions instance
Shows the view passed as parameter as a modal view.
View instance to be shown modally.
A ShowModalOptions instance
Unload view.
to unload.
Layout a child by taking into account its margins, horizontal and vertical alignments and a given bounds.
This parameter is not used. You can pass null.
Left position, relative to parent
Top position, relative to parent
Right position, relative to parent
Bottom position, relative to parent
Measure a child by taking into account its margins and a given measureSpecs.
This parameter is not used. You can pass null.
The view to be measured.
The measured height that the parent layout specifies for this view.
The measured width that the parent layout specifies for this view.
Utility to reconcile a desired size and state, with constraints imposed by a MeasureSpec. Will take the desired size, unless a different size is imposed by the constraints. The returned value is a compound integer, with the resolved size in the MEASURED_SIZE_MASK bits and optionally the bit MEASURED_STATE_TOO_SMALL set if the resulting size is smaller than the size the view wants to be.
Filed to use instead of instanceof ViewBase.