How to use the @nativescript/core/ui/builder.Builder.parse function in @nativescript/core

To help you get started, we’ve selected a few @nativescript/core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github NativeScript / NativeScript / tests / app / ui / web-view / web-view-safe-area-tests.ts View on Github external
private getViews(template: string) {
        let root = Builder.parse(template);

        return {
            root,
            list: root.getViewById("webview") as WebView
        };
    }
github NativeScript / NativeScript / tests / app / ui / list-view / list-view-safe-area-tests.ts View on Github external
private getViews(template: string) {
        let root = Builder.parse(template);

        return {
            root,
            list: root.getViewById("list") as ListView,
            cells: [
                [root.getViewById("cell00") as ListView, root.getViewById("cell01") as ListView, root.getViewById("cell02") as ListView],
                [root.getViewById("cell10") as ListView, root.getViewById("cell11") as ListView, root.getViewById("cell12") as ListView],
                [root.getViewById("cell20") as ListView, root.getViewById("cell21") as ListView, root.getViewById("cell22") as ListView]
            ]
        };
    }
github NativeScript / NativeScript / tests / app / ui / scroll-view / scroll-view-safe-area-tests.ts View on Github external
private getViews(template: string) {
        let root = Builder.parse(template);

        return {
            root,
            grid: root.getViewById("grid") as GridLayout,
            stack: root.getViewById("stack") as GridLayout,
            childFirst: root.getViewById("childFirst") as view.View,
            cells: [
                [root.getViewById("cell00") as view.View, root.getViewById("cell01") as view.View, root.getViewById("cell02") as view.View],
                [root.getViewById("cell10") as view.View, root.getViewById("cell11") as view.View, root.getViewById("cell12") as view.View],
                [root.getViewById("cell20") as view.View, root.getViewById("cell21") as view.View, root.getViewById("cell22") as view.View]
            ]
        };
    }