Skip to main content
grosssmutttr
Known Participant
September 27, 2012
Question

Save verticalScrollPosition change View

  • September 27, 2012
  • 1 reply
  • 669 views

Hi,

I load 200 texts out of a database and display the texts in a s:list. I try to save the verticalScrollPosition and restore it if the view is active again.

1. I send the httprequest <s:View creationComplete="srv2.send()" ....

2. The data is displayed in the s:list

<s:List id="list" width="90%" height="69%" top="{forButton.height+forButton.y+5}" 

                              dataProvider="{srv2.lastResult.uio.unumi}"

                              horizontalCenter="0" labelField="text" alternatingItemColors="[#f1f1f1,#58bef2]" textAlign="center" change="navigator.pushView(ThuiDetailView, list.selectedItem)" >

Problem: If I scroll the list, the list.dataGroup.contentHeight changes and so the "scrollbar slider" becomes smaller the more I scroll.

Solution: If the list.dataGroup.contentHeight would always be the same after the httprequest.

Any ideas how I could realize that?`

This blog post that I found didn't solve the problem:

http://flexponential.com/2010/12/05/saving-scroll-position-between-views-in-a-mobile-flex-application/

Best

This topic has been closed for replies.

1 reply

grosssmutttr
Known Participant
November 9, 2012

No idea?