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

Function create

apps/automated/src/navigation/transition-tests.ts:84–108  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

82 }
83 const navigationEntry: NavigationEntry = {
84 create(): Page {
85 let page = new Page();
86 page.id = testId;
87 page.style.backgroundColor = new Color(255, Math.round(Math.random() * 255), Math.round(Math.random() * 255), Math.round(Math.random() * 255));
88 const grid = new GridLayout();
89
90 const sharedElement = new GridLayout();
91 sharedElement.width = { unit: 'dip', value: 60 };
92 sharedElement.height = { unit: 'dip', value: 60 };
93 sharedElement.marginTop = 20;
94 sharedElement.borderRadius = 30;
95 sharedElement.verticalAlignment = 'top';
96 sharedElement.iosOverflowSafeArea = false;
97 sharedElement.backgroundColor = new Color('purple');
98 sharedElement.sharedTransitionTag = 'testing';
99 grid.addChild(sharedElement);
100
101 page.content = grid;
102
103 page.once('navigatedTo', () => {
104 done();
105 });
106
107 return page;
108 },
109 animated: true,
110 transition: navigationTransition,
111 };

Callers

nothing calls this directly

Calls 2

onceMethod · 0.80
addChildMethod · 0.45

Tested by

no test coverage detected