diff --git a/apps/app/ui-tests-app/list-view/list-view.ts b/apps/app/ui-tests-app/list-view/list-view.ts index 7d23540a6..4ca409ff3 100644 --- a/apps/app/ui-tests-app/list-view/list-view.ts +++ b/apps/app/ui-tests-app/list-view/list-view.ts @@ -58,3 +58,30 @@ export function onScroll(args: EventData) { } scrollToBottom = !scrollToBottom; } + +export function onScrollToIndex(args: EventData) { + let page = (args.object).page; + let gridLayout = page.getViewById("grid-layout"); + for (let i = 0, length = gridLayout.getChildrenCount(); i < length; i++) { + let listView = gridLayout.getChildAt(i); + listView.scrollToIndex(50); + } +} + +export function onScrollToIndexAnimated(args: EventData) { + let page = (args.object).page; + let gridLayout = page.getViewById("grid-layout"); + for (let i = 0, length = gridLayout.getChildrenCount(); i < length; i++) { + let listView = gridLayout.getChildAt(i); + listView.scrollToIndexAnimated(50); + } +} + +export function onScrollReset(args: EventData) { + let page = (args.object).page; + let gridLayout = page.getViewById("grid-layout"); + for (let i = 0, length = gridLayout.getChildrenCount(); i < length; i++) { + let listView = gridLayout.getChildAt(i); + listView.scrollToIndex(0); + } +} \ No newline at end of file diff --git a/apps/app/ui-tests-app/list-view/list-view.xml b/apps/app/ui-tests-app/list-view/list-view.xml index 791dea4ff..f5f4ac403 100644 --- a/apps/app/ui-tests-app/list-view/list-view.xml +++ b/apps/app/ui-tests-app/list-view/list-view.xml @@ -1,6 +1,11 @@ -