How to use the @nativescript/core/ui/tab-view.TabViewItem 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 / root-view / reset-root-view-tests.ts View on Github external
function createTestTabRootEntry() {
    const testFrameRoot1 = createTestFrameRootEntry();
    const testFrameRoot2 = createTestFrameRootEntry();

    const tabView = new TabView();
    const tabEntry1 = new TabViewItem();
    tabEntry1.title = "frameRoot1";
    tabEntry1.view = testFrameRoot1.root;
    const tabEntry2 = new TabViewItem();
    tabEntry2.title = "frameRoot2";
    tabEntry2.view = testFrameRoot2.root;
    tabView.items = [tabEntry1, tabEntry2];

    const entry: NavigationEntry = {
        create: () => tabView
    };

    return {
        entry: entry,
        root: tabView,
        page: testFrameRoot1.page
    };
}
github NativeScript / NativeScript / tests / app / ui-helper.ts View on Github external
newPage.actionBar.title = "Test ActionBar";
        }

        if (options.actionBarFlat) {
            newPage.actionBarHidden = false;
            newPage.actionBar.title = "Test ActionBar Flat";
            newPage.actionBar.flat = true;
        }

        if (options.actionBarHidden) {
            newPage.actionBarHidden = true;
        }

        if (options.tabBar) {
            const tabView = new TabView();
            const tabEntry = new TabViewItem();
            tabEntry.title = "Test";
            tabEntry.view = controlToTest;
            tabView.items = [tabEntry];
            testSubject = tabView;
        }
    }

    newPage.content = testSubject;

    testFunction([controlToTest, newPage]);
    newPage.content = null;
    newPage.css = null;
}
github NativeScript / NativeScript / tests / app / ui / root-view / reset-root-view-tests.ts View on Github external
function createTestTabRootEntry() {
    const testFrameRoot1 = createTestFrameRootEntry();
    const testFrameRoot2 = createTestFrameRootEntry();

    const tabView = new TabView();
    const tabEntry1 = new TabViewItem();
    tabEntry1.title = "frameRoot1";
    tabEntry1.view = testFrameRoot1.root;
    const tabEntry2 = new TabViewItem();
    tabEntry2.title = "frameRoot2";
    tabEntry2.view = testFrameRoot2.root;
    tabView.items = [tabEntry1, tabEntry2];

    const entry: NavigationEntry = {
        create: () => tabView
    };

    return {
        entry: entry,
        root: tabView,
        page: testFrameRoot1.page
    };