Nativescript-ui-feedback: RadListView wrong scrollOffset when using headerItemTemplate

Created on 4 Mar 2018  路  13Comments  路  Source: ProgressNS/nativescript-ui-feedback

Tell us about the problem

When using RadListView with headerItemTemplate, the scrollOffset value from the scrolledEvent jumps in a range +-20

Which platform(s) does your issue occur on?

Currently only tested on Android

Please provide the following version numbers that your issue occurs with:

  • Progress NativeScript UI version: 3.5.0
  • CLI: 3.4.2
  • Cross-platform modules: 3.4.0
  • Runtime(s): tns-android 3.4.1

Please tell us how to recreate the issue in as much detail as possible.

  1. Place RadListView on a page
  2. add a headerItemTemplate and a itemTemplate to the RadListView
  3. set height of headerItemTemplate to 50
  4. add a handler for the scrolledEvent (scrolled="myScrollHandler")
  5. slowly scroll up and down between the offset of headerItemTemplate height (50)
    6 scrollOffset will jump to a value with a factor +-20

Is there code involved? If so, please share the minimal amount of code needed to recreate the problem.

No special code, please see attached video, the red square uses the scrollOffset form RadLstView provided by the scrolledEvent, you can see how it jumps when scroll position is in the range of headerItemTemplate
2018_03_04_14_47_30.mp4.zip

backlog listview android ready for release high

Most helpful comment

@racknoris Due to other priorities this issue had not been added to our latest planned tasks for the next Q release. We will do our best to investigate and resolve this issue as soon as possible.

All 13 comments

Hi @tomstar76,
Thank you for contacting us.

I reviewed your case, however, was unable to recreate this problem on my side. For your convenience, I am attaching a sample project. The project demonstrates that the scrollOffset is correctly returned. You could review the attached video.

Also, you could review the project and make the needed changes, which will allow us to recreate the problem.

Archive.zip

demo.mp4.zip

Closing due to inactivity

I am having this exact problem. Please see this video:

https://cl.ly/983c45a4cefa

@NathanWalker

@tomstar76 did you ever figure out a solution?

FYI I was able to discern that when you scroll the headerItemTemplate off the screen, the scrollOffset value is reset to something smaller, in the video I pasted its about 200pts lower. My guess is the view is recycled as it is scrolled off screen, its height is set to the height of the rest of the cells on screen (?) so the scrollOffset gets fumbled.

Hey @davecoffin ,

no, i did not found a solution for that, support could not reproduce my problem, so i had to move to another framework. hope u find a solution. Best Tom

Were you using angular? @NickIliev @tsonevn I can confirm your example app works fine, but I am using Angular, did you try reproducing in angular?

it is longer time ago, and i am not sure if i used angular, for the sample app i was not using angular, i could not remember :-)

@VladimirAmiorkov ^^^ this is real issue - perhaps we can solve together.

Reopened

@VladimirAmiorkov @NathanWalker @davecoffin Did you manage to solve this or find a workaround?
In my scenario I don't use a headerItem and it still happens

@racknoris Due to other priorities this issue had not been added to our latest planned tasks for the next Q release. We will do our best to investigate and resolve this issue as soon as possible.

The fix is released in the [email protected] version. Enjoy!

Was this page helpful?
0 / 5 - 0 ratings