You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 17, 2022. It is now read-only.
A basic method signature to hook an event listener (shortcut alias to the addEventListener method).
212
212
-**eventNames** - _String_
213
-
- 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.
213
+
- 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.
Layouting is the process of measuring and positioning the child views of a [Layout][Layout] container. Layouting is an intensive process whose speed and performance depend on the count of the children and the complexity of the layout container. For example, a simple layout container such as [AbsoluteLayout][AbsoluteLayout] might perform better than a more complex layout container, such as [GridLayout][GridLayout].
23
+
## Layout Process
26
24
27
-
Layouting completes in two passes - a measure pass and a layout pass. Every layout container provides its own `onMeasure()` and `onLayout()` methods to achieve its own specific layouting.
25
+
Layout is the process of measuring and positioning the child views of a [Layout][Layout] container. Layout is an intensive process whose speed and performance depend on the count of the children and the complexity of the layout container. For example, a simple layout container such as [AbsoluteLayout][AbsoluteLayout] might perform better than a more complex layout container, such as [GridLayout][GridLayout].
26
+
27
+
Layout completes in two passes - a measure pass and a layout pass. Every layout container provides its own `onMeasure()` and `onLayout()` methods to achieve its own specific layout.
28
28
29
29
### Measure Pass
30
30
@@ -53,7 +53,7 @@ During the layout pass, each [View][View] is placed in a specific layout slot. T
53
53
54
54
### Alignment
55
55
56
-
Layouting applies horizontal and vertical alignment only when an element is allocated more size than it needs.
56
+
Layout applies horizontal and vertical alignment only when an element is allocated more size than it needs.
57
57
58
58
The following table shows the valid values of `horizontalAlignment`.
59
59
@@ -85,15 +85,15 @@ When you set margins through XML, you can choose between the following approache
85
85
86
86
## Layouts
87
87
88
-
`Layout` is the base class for all views that provide positioning of child elements.
88
+
`Layout` is the base class for all views that provide positioning of child elements.
89
89
90
90
You can use the various layout containers to position elements. They evaluate the base properties of [View][View] such as `width`, `height`, `minWidth` and alignments, and expose additional properties for positioning child views (such as the four paddings).
91
91
92
92
### Layout Paddings
93
93
94
-
The four padding properties (`paddingTop`, `paddingRight`, `paddingBottom` and `paddingLeft`) describe the distance between the layout container and its children.
94
+
The four padding properties (`paddingTop`, `paddingRight`, `paddingBottom` and `paddingLeft`) describe the distance between the layout container and its children.
95
95
96
-
When set paddings through XML, you can choose between the following approaches.
96
+
When set paddings through XML, you can choose between the following approaches.
97
97
98
98
***Set one value**: Provide a single value which will be applied on all sides of the view.
99
99
***Set two values**: Provide two values. The first value is applied to the top side, the second value is applied to the right side. Next, the first value is applied to the bottom and the second value - the left side (in that order).
@@ -104,7 +104,7 @@ When set paddings through XML, you can choose between the following approaches.
104
104
The following table shows predefined layouts that NativeScript provides.
105
105
106
106
| Layouts | Description | Screenshot |
107
-
| -------- | ------------ | ---------- |
107
+
| -------- | ------------ | ---------- |
108
108
|[AbsoluteLayout][AbsoluteLayout]| This layout lets you set exact locations (left/top coordinates) for its children. ||
109
109
|[DockLayout][DockLayout]| This layout arranges its children at its outer edges and allows its last child to take up the remaining space. ||
110
110
|[GridLayout][GridLayout]| This layout defines a rectangular layout area that consists of columns and rows. ||
0 commit comments