mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
* chore(apps): add modal-navigation-app for ui testing * test(e2e): add modal-navigation app * test(apps): remove modal-navigation-app The app has been moved to `e2e/modal-navigation`. * chore: include e2e folder to npm scripts * docs: include e2e folder to DevelopmentWorkflow.md * chore(e2e): update .gitignore * fix(e2e): relative paths * chore(e2e): update package.json * test(e2e): add change root view to modal-navigation * test(e2e): set androidTabsPosition to botton * chore(e2e): add VSCode launch.json config * docs(e2e): delete LICENSE and README.md files * refactor(e2e): rename modal-tab-page to modal-tab-root * test(e2e): update iOS launch screen
47 lines
1.3 KiB
TypeScript
47 lines
1.3 KiB
TypeScript
import { StackLayout } from "tns-core-modules/ui/layouts/stack-layout";
|
|
import { NavigatedData, Page } from "tns-core-modules/ui/page";
|
|
import { View, EventData } from "tns-core-modules/ui/core/view";
|
|
import { Frame } from "tns-core-modules/ui/frame";
|
|
|
|
export function onNavigatingTo(args: NavigatedData) {
|
|
console.log("second-page onNavigatingTo");
|
|
}
|
|
|
|
export function onNavigatingFrom(args: NavigatedData) {
|
|
console.log("second-page onNavigatingFrom");
|
|
}
|
|
|
|
export function onNavigatedTo(args: NavigatedData) {
|
|
console.log("second-page onNavigatedTo");
|
|
}
|
|
|
|
export function onNavigatedFrom(args: NavigatedData) {
|
|
console.log("second-page onNavigatedFrom");
|
|
}
|
|
|
|
export function onGoBack(args: EventData) {
|
|
const view = args.object as View;
|
|
const page = view.page as Page;
|
|
page.frame.goBack();
|
|
}
|
|
|
|
export function onModalFrame(args: EventData) {
|
|
const view = args.object as View;
|
|
|
|
const frame = new Frame();
|
|
frame.navigate("modal/modal-page");
|
|
|
|
view.showModal(frame,
|
|
"context",
|
|
() => console.log("home-page modal frame closed"),
|
|
false);
|
|
}
|
|
|
|
export function onModalPage(args: EventData) {
|
|
const view = args.object as View;
|
|
view.showModal("modal/modal-page",
|
|
{ frameless: true },
|
|
() => console.log("home-page modal page closed"),
|
|
false);
|
|
}
|