很难找到 xml 本机脚本的示例。有本地脚本的引导程序吗?

Finding it very hard to find xml examples for native script. Is there a bootsnip for native script?

我正在尝试使用本机脚本创建底部栏。我的第一次尝试是在下面的非常基本的想法。我正在考虑使用很棒的字体,然后将文字放在图标下方。我的问题是这个或网站是否有任何示例 xml xml 像 bootstrap 的 bootsnip 以及下面的代码是否是实现目标底部导航栏的好方法图片.

 <DockLayout stretchLastChild="true">
        <StackLayout dock="bottom" verticalAlignment="bottom" stretch="fill">
            <StackLayout orientation="horizontal" horizontalAlignment="center">
                <Label text="Home" dock="left" backgroundColor="red"></Label>
                <Label text="Medications" dock="left" backgroundColor="green"></Label>
                <Label text="Medication Detail" dock="left" backgroundColor="blue"></Label>
                <Label text="Whatever" backgroundColor="yellow"></Label>
            </StackLayout>
        </StackLayout>
    </DockLayout>

您可以使用 NativeScript Tab View Sample code

试试这个: 您可以替换 ScrollView with you ListView

<GridLayout rows="*, auto, auto">
    <ScrollView row="0">
        <StackLayout row="0" backgroundColor="#eeeeee">
            <Label text="Hello world" textWrap="true"></Label>
            <Label text="Hello world" textWrap="true"></Label>
            <Label text="Hello world" textWrap="true"></Label>
            <Label text="Hello world" textWrap="true"></Label>
            <Label text="Hello world" textWrap="true"></Label>
            <Label text="Hello world" textWrap="true"></Label>
            <Label text="Hello world" textWrap="true"></Label>
            <Label text="Hello world" textWrap="true"></Label>
            <Label text="Hello world" textWrap="true"></Label>
            <Label text="Hello world" textWrap="true"></Label>
            <Label text="Hello world" textWrap="true"></Label>
            <Label text="Hello world" textWrap="true"></Label>
            <Label text="Hello world" textWrap="true"></Label>
            <Label text="Hello world" textWrap="true"></Label>
            <Label text="Hello world" textWrap="true"></Label>
            <Label text="Hello world" textWrap="true"></Label>
            <Label text="Hello world" textWrap="true"></Label>
            <Label text="Hello world" textWrap="true"></Label>
            <Label text="Hello world" textWrap="true"></Label>
        </StackLayout>
    </ScrollView>
    <StackLayout height="2" backgroundColor="#777" row="1"></StackLayout>
    <GridLayout class="foot" columns="*,*,*,*" row="2">
        <Label col="0" text="" textWrap="true"></Label>
        <Label col="1" text="" textWrap="true"></Label>
        <Label col="2" text="" textWrap="true"></Label>
        <Label col="3" text="" textWrap="true"></Label>
    </GridLayout>
</GridLayout>
   .foot {
        background-color: #ccc;
    }

    .foot label {
        text-align: center;
        vertical-align: middle;
        padding: 10;
        font-size: 20;
    }