MCPcopy Create free account
hub / github.com/NativeScript/NativeScript / _generateFormattedString

Function _generateFormattedString

apps/automated/src/ui-helper.ts:268–293  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

266}
267
268export function _generateFormattedString(): FormattedString {
269 let formattedString = new FormattedString();
270 let span: Span;
271
272 span = new Span();
273 span.fontFamily = 'serif';
274 span.fontSize = 10;
275 span.fontWeight = 'bold';
276 span.color = new Color('red');
277 span.backgroundColor = new Color('blue');
278 span.textDecoration = 'line-through';
279 span.text = 'Formatted';
280 formattedString.spans.push(span);
281
282 span = new Span();
283 span.fontFamily = 'sans-serif';
284 span.fontSize = 20;
285 span.fontStyle = 'italic';
286 span.color = new Color('green');
287 span.backgroundColor = new Color('yellow');
288 span.textDecoration = 'underline';
289 span.text = 'Text';
290 formattedString.spans.push(span);
291
292 return formattedString;
293}
294
295export function nativeView_recycling_test(createNew: () => View, createLayout?: () => LayoutBase, nativeGetters?: Map<string, (view) => any>, customSetters?: Map<string, any>) {
296 return;

Callers

nothing calls this directly

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected