【发布时间】:2020-03-19 14:27:00
【问题描述】:
我是 Nativescript 开发的新手,我有一个由 GridLayout 包裹的 ScrollView,在 ScrollView 内我放置了各种 StackLayouts,但是滚动布局根本不起作用,其中一个堆栈布局(黄色)显示为居中,知道我的代码有什么问题吗?
<template>
<Page class="background-color:white;">
<ActionBar class="bg_blue_marine">
</ActionBar>
<GridLayout rows="*,auto" columns="*" style="width:100%; height:100%;">
<ScrollView row="0" col="1" orientation="vertical" style="width:100%; height:auto; background-color:rgb(200,200,200);">
<StackLayout style="width:100%; height:400px; background-color:red;"></StackLayout>
<StackLayout style="width:100%; height:400px; background-color:yellow;"></StackLayout>
</ScrollView>
<FlexBoxLayout row="1" col="1" style="width:100%; height:80px; align-items:center; justify-content:space-around; background-color:white;"></FlexBoxLayout>
</GridLayout>
</Page>
</template>
【问题讨论】:
标签: javascript android ios vue.js nativescript