Nativescript:stackView 不启用滚动
Nativescript: stackView not enabling scroll
我正在使用 angular 2 构建第一个 nativescript 应用。
我创建了一个简单的 stackView 来查看一些项目内容:
<StackLayout orientation="vertical" class="item-section">
<Image [src]="item.image" width="80%" class="item-image"></Image>
<label>{{item.title}}</label>
<label text="{{ item.title }}" class="item-title"></label>
<label text="{{ item.subtitle }}" class="item-subtitle"></label>
<label text="{{ item.date }}" class="item-date"></label>
<label text="{{ item.description }}" textWrap="true" class="item-description"></label>
<label text="Google maps" ></label>
</StackLayout>
有时 item.description 比屏幕显示的长且大。在这种情况下,我无法向下滚动以查看说明的结尾。如何最好地显示所有内容?
注意:我已经创建了一个列表视图,所有内容都可以很好地滚动显示。
我能够通过将描述包装在滚动视图中来回答:
https://docs.nativescript.org/angular/code-samples/ui/scroll-view.html
我正在使用 angular 2 构建第一个 nativescript 应用。
我创建了一个简单的 stackView 来查看一些项目内容:
<StackLayout orientation="vertical" class="item-section">
<Image [src]="item.image" width="80%" class="item-image"></Image>
<label>{{item.title}}</label>
<label text="{{ item.title }}" class="item-title"></label>
<label text="{{ item.subtitle }}" class="item-subtitle"></label>
<label text="{{ item.date }}" class="item-date"></label>
<label text="{{ item.description }}" textWrap="true" class="item-description"></label>
<label text="Google maps" ></label>
</StackLayout>
有时 item.description 比屏幕显示的长且大。在这种情况下,我无法向下滚动以查看说明的结尾。如何最好地显示所有内容?
注意:我已经创建了一个列表视图,所有内容都可以很好地滚动显示。
我能够通过将描述包装在滚动视图中来回答:
https://docs.nativescript.org/angular/code-samples/ui/scroll-view.html