This question is locked. New answers and comments are not allowed.
Hi,
I found an issue on RadListView on Android that when click on an item and navigated to a detail page, when click back, it will scroll back to the top of the list. The expected behavior is that it should stay on where I clicked the item.
Versions:
- NativeScript UI Pro: 1.6.0_063
- NativeScript 2.5.1
- TNS Core Module: 2.5.1
Steps to reproduce:
- Clone the nativescript-ui angular sample project (https://github.com/telerik/nativescript-ui-samples-angular.git)
- Run "tns update" to update to tns-core-modules 2.5.1
- In the listview load on demand sample (nativescript-ui-samples-angular/sdkAngular/app/listview/load-on-demand/listview-load-on-demand.component.android.html), add a tap action to navigate to a simple detail page:
<
template
tkListItemTemplate
let-item
=
"item"
>
<
StackLayout
class
=
"itemTemplateStackLayout"
orientation
=
"vertical"
(tap)="listviewDetailTap()">
- In the component (nativescript-ui-samples-angular/sdkAngular/app/listview/load-on-demand/listview-load-on-demand.component.ts), add the code to handle the tap and route to the detail component (router is of RouterExtensions)
listviewDetailTap() {
console.log(`Listview detail tapped`);
this.router.navigate(["listviewdetail"]);
}
- Modify app.component.ts to add the route to the ListviewDetailComponent (just a simple component will some static content)
- Run the project on Android emulator
- Open the RadListView Load on Demand sample, scroll to the bottom, and then click on the item. It will display the detail page. When click back button on Android emulator, it will go back to the list view page. However, it will always scroll back to the top of the list, not the position where I clicked the item.
- The issue doesn't exists on iOS
Kindly advice and thanks
Clarence