Hi John,

if your app has something like "pages" this could work. You could use a
StackPane and put the first page (for example a list view) into it. When a
state change occurs (for example a list item is clicked and we move over to
a detail view) we could put this second page over the first page in the
StackPane. If a "jump to previous page" action is fired then the element on
top of the StackPane is pop()'ed and we see the ListView with the previous
scroll offset.

--Benjamin

On Sun, Mar 22, 2015 at 1:53 PM, John Hendrikx <hj...@xs4all.nl> wrote:

> On 22/03/2015 09:59, Tom Eugelink wrote:
>
>> On 22-3-2015 00:12, John Hendrikx wrote:
>>
>>>
>>> What I do need however is a way to restore the control to the exact same
>>> state it was in before (the same amount of pixels scrolled, the same item
>>> at the top, the same item at the bottom).
>>>
>>
>> That is an interesting use case. Can you describe it a bit more?
>>
>> Tom
>>
>>  My app works more like a browser, so when I "go back", I expect the same
> screen layout again (even though I have to reconstruct the screen again).
> With a ListView, this cannot be done as the #scrollTo method only shows an
> item.  It doesn't remember however if that item was somewhere in the
> middle, top or bottom.  It's just convenient if it was in the same spot, as
> the user might expect it there.  Just like I expect my browser to go back
> to the same spot helps me a bit (eg: I clicked the link at the bottom of
> the screen somewhere, and there was something else interesting to the left
> of it -- that fails if it is now somewhere else).
>
> --John
>

Reply via email to