我正在尝试创建一个嵌套列表视图(父水平滚动和子垂直滚动),它正在工作并且看起来很完美,但是当单击垂直呈现的子项并导航到新页面然后返回时,垂直滚动位置丢失了。
这是我的示例代码:
<RadListView [items]="data" #parentRadlistview>
<ListViewLinearLayout tkListViewLayout scrollDirection="Horizontal" itemInsertAnimation="Default" itemDeleteAnimation="Default"></ListViewLinearLayout>
<ng-template tkListItemTemplate let-d="item" let-i="index">
<StackLayout orientation="vertical">
<RadListView [items]="d.list" class="radlistview-child" #childRadlistview>
<ListViewLinearLayout tkListViewLayout dynamicItemSize="false" scrollDirection="Vertical" itemInsertAnimation="Default" itemDeleteAnimation="Default"></ListViewLinearLayout>
<ng-template tkListItemTemplate let-course="item">
<label [text]="course.name"></label>
</ng-template>
</RadListView>
</StackLayout>
</ng-template>
如果有人能指导我如何解决这个问题,那将非常有帮助。
PS:我不能使用 Tabview,因为我需要父 RadListView 的宽度小于整个屏幕。而且我不能使用滚动视图进行水平滚动,因为它需要像 Tabview 一样工作,而我只使用 RadListView 工作。
谢谢!