Skip to content

Commit 800efe2

Browse files
author
vakrilov
committed
SegmentedBarItem and nativeView remarks
1 parent 20bf5b7 commit 800efe2

1 file changed

Lines changed: 18 additions & 1 deletion

File tree

‎Modules30Changes.md‎

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ Use the corresponding events such: `application.on(“suspend”, (args: applica
6464
Removed all android specific callback methods. For example instead of `application.android.onActivityResult(…)` use `application.android.on("activityResult", (eventData) => …)`
6565

6666
### Console
67-
`console.dump()` removed, use `console.dir()` instead
67+
`console.dump()` removed, use `console.dir()` instead.
6868

6969
### KeyframeAnimation
7070
Changed method `keyframeAnimationFromInfo(info: KeyframeAnimationInfo, valueSourceModifier: number): KeyframeAnimation` to `KeyframeAnimation.keyframeAnimationFromInfo(info: KeyframeAnimationInfo): KeyframeAnimation`. ValueSource no longer needed.
@@ -77,6 +77,20 @@ Use `observableModule.fromObject(obj)` method instead.
7777
Removed method `insertTab()`. You can use `items` property for setting additional tabs.
7878
Removed method `getValidIndex()` - it was intended for internal use only.
7979

80+
The 'items' property os of type `SegmentedBarItem[]`. Items should be created using the `SegmentedBarItem` constructor.
81+
82+
Old code:
83+
```
84+
let firstItem = {"title": "first"};
85+
segmentedBar.items = [ firstItem ];
86+
```
87+
New code:
88+
```
89+
let firstItem = new SegmentedBarItem();
90+
firstItem.title = "first";
91+
segmentedBar.items = [ firstItem ];
92+
```
93+
8094
### Span
8195
Removed methods and properties. These were for internal use only and not needed any more:
8296
* `parentFormattedString` property
@@ -135,6 +149,9 @@ There are several type of Properties in modules 3.0:
135149
* `CssProperty` – property defined on `Style` type. These are properties that could be set in CSS.
136150
* `InheritedCssProperty `- property defined on `Style` type. These are inheritable CSS properties that could be set in CSS and propagates value on its children. These are properties like `FontSize`, `FontWeight`, `Color`, etc.
137151

152+
### NativeView property
153+
There is a new property `nativeView` in `ViewBase` class. It is recommended to use `nativeView` instead of `ios` and `android` properties. The `ios` and `android` properties are left for compatibility, however all view-lifecycle methods and native property callbacks (explained below) should work with the `nativeView` property.
154+
138155
### Property Example
139156
In here is how to define `text` (view property) and `text-align` (css property) for the text-View
140157

0 commit comments

Comments
 (0)