Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function createPage(i: number) {
const page = new Page();
page.id = `Tab${i} Frame${i} Page${i}`;
return page;
}
function createTestFrameRootEntry() {
const page = new Page();
const frameRoot = new Frame();
frameRoot.navigate(() => page);
const entry: NavigationEntry = {
create: () => frameRoot
};
return {
entry: entry,
root: frameRoot,
page: page
};
}
function createPage(i: number) {
const page = new Page();
page.id = `Tab${i} Frame${i} Page${i}`;
return page;
}
const create = () => {
const page = new Page();
pages.push(page);
return page;
};
helper.navigate(() => {
const page = new Page();
page.id = "TransitionsTestPage_MAIN";
page.style.backgroundColor = new Color(255, Math.round(Math.random() * 255), Math.round(Math.random() * 255), Math.round(Math.random() * 255));
return page;
});
export function createPage() {
var page = new pages.Page();
var grid = new gridModule.GridLayout();
grid.addRow(new gridModule.ItemSpec());
grid.addRow(new gridModule.ItemSpec());
page.content = grid;
var count = 0;
var control = new btns.Button();
control.text = "test control";
control.on(btns.Button.tapEvent, (data) => { control.text = "count: " + count++; });
grid.addChild(control);
var scrollView = new scroll.ScrollView();
gridModule.GridLayout.setRow(scrollView, 1);
grid.addChild(scrollView);
var stack = new stacks.StackLayout();
scrollView.content = stack;
export function tearDownModule() {
const page = new Page();
const frame = new Frame();
frame.navigate(() => page);
const entry: NavigationEntry = {
create: () => frame
};
waitUntilNavigatedToMaxTimeout([page], () => _resetRootView(entry));
}
grid.addColumn(new ItemSpec(1, "auto"));
grid.addColumn(new ItemSpec(1, "star"));
grid.addRow(new ItemSpec(1, "auto"));
grid.addRow(new ItemSpec(1, "star"));
var image = new Image();
image.stretch = "fill";
image.verticalAlignment = "bottom";
image.horizontalAlignment = "center";
image.imageSource = ImageSource.fromFileSync(__dirname + "/test.png");
grid.addChild(image);
var page = new Page();
page.content = grid;
page.css = "GridLayout { background-color: pink } image { background-color: green }";
return page;
}