本文整理汇总了TypeScript中tns-core-modules/ui/frame.Frame类的典型用法代码示例。如果您正苦于以下问题:TypeScript Frame类的具体用法?TypeScript Frame怎么用?TypeScript Frame使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Frame类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的TypeScript代码示例。
示例1: createFrame
function createFrame(i: number, page: Page) {
const frame = new Frame();
frame.navigate(() => page);
frame.id = `Tab${i} Frame${i}`;
return frame;
}
开发者ID:qbert,项目名称:NativeScript,代码行数:7,代码来源:tab-view-root-tests.ts
示例2: topmost
exports.secondaryActionTap = args => {
googleAnalytics.logEvent({
category: "Basic Actions",
action: "Click",
label: "Secondary Button"
});
const topmostFrame: Frame = topmost();
topmostFrame.navigate("secondary-page");
};
开发者ID:EddyVerbruggen,项目名称:nativescript-googleanalytics,代码行数:10,代码来源:main-page.ts
示例3: tearDownModule
export function tearDownModule() {
const page = new Page();
const frame = new Frame();
frame.navigate(() => page);
const entry: NavigationEntry = {
create: () => frame
};
waitUntilNavigatedToMaxTimeout([page], () => _resetRootView(entry));
}
开发者ID:qbert,项目名称:NativeScript,代码行数:11,代码来源:tab-view-root-tests.ts
示例4: onModalFrame
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);
}
开发者ID:NathanWalker,项目名称:NativeScript,代码行数:11,代码来源:second-page.ts
示例5: createTestFrameRootEntry
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
};
}
开发者ID:NathanaelA,项目名称:NativeScript,代码行数:15,代码来源:reset-root-view-tests.ts
示例6: test_frame_retrieval_API_when_navigating
export function test_frame_retrieval_API_when_navigating() {
const rootView = getRootView();
const initialFrame = new Frame();
initialFrame.id = "initialFrame";
initialFrame.navigate(() => new Page());
const initialTopmost = topmost();
const initialFrameById = getFrameById("initialFrame");
TKUnit.assertEqual(initialTopmost, initialFrame);
TKUnit.assertEqual(initialFrameById, initialFrame);
const newFrame = new Frame();
newFrame.id = "newFrame";
newFrame.navigate(() => new Page());
const newTopmost = topmost();
const newFrameById = getFrameById("newFrame");
TKUnit.assertEqual(newTopmost, newFrame);
TKUnit.assertEqual(newFrameById, newFrame);
initialFrame.navigate(() => new Page());
const previousTopmost = topmost();
const previousFrameById = getFrameById("initialFrame");
TKUnit.assertEqual(previousTopmost, initialFrame);
TKUnit.assertEqual(previousFrameById, initialFrame);
// clean up the frame stack
initialFrame._removeFromFrameStack();
newFrame._removeFromFrameStack();
}
开发者ID:qbert,项目名称:NativeScript,代码行数:35,代码来源:frame-tests-common.ts
示例7: function
btnActivity.on(button.Button.tapEvent, function () {
var newFrame = new frame.Frame();
var newPage = "tests/pages/navigation/pageA-new-activity";
newFrame.navigate(newPage);
});
开发者ID:NathanWalker,项目名称:NativeScript,代码行数:5,代码来源:pageB.ts
示例8: wireEvents
function wireEvents(){
page.getViewById("genstureSwipe").on("swipe", (args: SwipeGestureEventData) => {
googleAnalytics.logEvent({
category: "Gestures",
action: "Swipe",
label: "Direction: " + args.direction,
value: args.direction
});
showMessage("Swipe Direction: " + args.direction);
console.log("Swipe Direction: " + args.direction);
});
page.getViewById("genstureLongTap").on("longPress", args => {
googleAnalytics.logEvent({
category: "Gestures",
action: "Long Press",
label: "Long press on screen"
});
showMessage("Long Press");
console.log("Long Press");
});
}
开发者ID:EddyVerbruggen,项目名称:nativescript-googleanalytics,代码行数:23,代码来源:main-page.ts
示例9:
TKUnit.waitUntilReady(() => frame.navigationQueueIsEmpty(), NAV_WAIT);
开发者ID:NathanWalker,项目名称:NativeScript,代码行数:1,代码来源:frame-tests-common.ts
注:本文中的tns-core-modules/ui/frame.Frame类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论