Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

New Member
Posts: 7
Registered: ‎02-27-2014
My Device: DAC
My Carrier: China Mobile
Accepted Solution

[bbui]about bbui pushScreen

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.


Posts: 1,561
Registered: ‎04-12-2010
My Device: BlackBerry Z10
My Carrier: Bell

Re: [bbui]about bbui pushScreen

[ Edited ]

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.

Erik Oros | @WaterlooErik | eoros@blackberry.com | Developer Issue Tracker

If a reply has answered your question, please click Accept as Solution to help other visitors in the future.