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
@@ -182,11 +182,11 @@ The JS classes are **thin wrappers** over `org.nativescript.widgets.RemoteViews.
182
182
183
183
```ts
184
184
const tv =newTextView();
185
-
tv.native.setText('Total: 42'); // fluent native API
186
-
tv.native.setTextColor(0xffffffff);// ARGB int
185
+
tv.setText('Total: 42'); // fluent wrapper API
186
+
tv.setTextColor(0xffffffff); // ARGB int
187
187
```
188
188
189
-
> **TypeScript note:** the wrapper's `.native` getter is typed as the base `org.nativescript.widgets.RemoteViews`, which does not surface the leaf setters (`setText`, `setImageUrl`, …). At runtime the instance is the correct subclass, so the calls work — add a cast (`(tv.native as any).setText(...)`) if the compiler complains, or reach for the fully‑typed `org.nativescript.widgets.RemoteViews.*` classes directly.
189
+
Most common operations are exposed directly on the JS wrapper (`setText`, `setImageUrl`, `setVisibility`, `setSize`, and more). The `.native` handle is still available for platform-level interop when needed.
190
190
191
191
Every node takes an optional stable `id` string in its constructor (`new TextView('total')`). Omit it and one is generated.
192
192
@@ -216,8 +216,8 @@ All of them extend the base `RemoteViews` wrapper, which exposes `.native` and `
0 commit comments