我正在使用 ng-template
+ ListView
来推送图片等动态内容。
ListView
位于 ScrollView
内。
我需要滚动整个页面,避免由 ListView
引起的双滚动。
作为解决方法,我将 isUserInteractionEnabled="false"
放在 ListView
上以锁定内容并防止滚动,但内容就像“剪切”一样,我什至无法再滚动如果有更多图片要显示。
代码:
<ListView [items]="items" isUserInteractionEnabled="false">
<ng-template let-item="item">
<GridLayout columns="auto" rows="*, *">
<GridLayout row="0" col="0" columns="auto" rows="*">
<Image col="0" row="0" stretch="fill" height="240" width="240" [src]="item.imageSquare.url"></Image>
</GridLayout>
<GridLayout row="1" col="0" columns="auto" rows="*">
<Image col="0" row="0" stretch="fill" height="160" width="540" [src]="item.imageRect.url"></Image>
</GridLayout>
</GridLayout>
</ng-template>
</ListView>
最佳答案
关于android - 使用 ng-template 问题的 ListView 内部的 ScrollView,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62410452/