02-27-2014 09:17 PM
I want the effect that cascades provided,when I click an item, it slides in the details page,
and when I swipe right or click the back button,it slides away , return to the position I was looking at.
But in bbui, when I call pushScreen, it loads another page ( fine there's slide effect I know )
but when I want to back and called popScreen(), it reloads the parent screen again and I lose the position I've read.
plus, no swipe effect .
and this sucks,hope be improved.
Solved! Go to Solution.
02-28-2014 04:31 PM - edited 02-28-2014 04:32 PM
Unfortunately that's the way BBUI is currently setup to work. All the content is loaded into the same container of the same document. Basically like one sheet of paper that keeps getting erased and new content is drawn on (as opposed to switching between multiple sheets.)
BBUI doesn't currently have implemented any mechanism to remember the scroll position upon "leaving" a page and resetting it once returning, so the position gets wiped out when the content gets wiped out.
EDIT: You could potentially include this management yourself; storing the scroll position before calling pushScreen and then restoring the scroll position when the page is returned to; by monitoring the ondomready event.
There are other UI frameworks that have this included, and work is being done to enhance the offering that BBUI provides today but I don't have a timeline on when that would be just yet.