MCPcopy Index your code
hub / github.com/NativeScript/NativeScript / buttonTap

Function buttonTap

apps/ui/src/css/text-shadow-page.ts:15–35  ·  view source on GitHub ↗
(args: EventData)

Source from the content-addressed store, hash-verified

13let currentIndex = 0;
14
15export function buttonTap(args: EventData) {
16 let page = (<TextBase>args.object).page;
17 let lbl = <TextBase>page.getViewById('Label');
18 let btn = <TextBase>page.getViewById('Button');
19 let textField = <TextBase>page.getViewById('TextField');
20 let textView = <TextBase>page.getViewById('TextView');
21
22 let newIndex = currentIndex++ % possibleValues.length;
23 let newValue = possibleValues[newIndex];
24
25 lbl.textShadow = parseCSSShadow(newValue);
26 btn.textShadow = parseCSSShadow(newValue);
27 textField.textShadow = parseCSSShadow(newValue);
28 textView.textShadow = parseCSSShadow(newValue);
29
30 if (lbl.text === 'Change text') {
31 lbl.text = btn.text = textField.text = textView.text = 'Text changed';
32 } else {
33 lbl.text = btn.text = textField.text = textView.text = 'Change text';
34 }
35}

Callers

nothing calls this directly

Calls 1

parseCSSShadowFunction · 0.90

Tested by

no test coverage detected