Welcome!

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

Java Development

Reply
Developer
Posts: 34
Registered: ‎08-11-2011
My Device: BlackBerry Bold
My Carrier: Axis

Facebook Like Slide-Down Transition

Hi, I want to create a slide-down transition like the one used by the BlackBerry Facebook application.

 

Facebook 1

 

The transition occurs when the user clicks on the banner with the Facebook logo on it. The neat thing with Facebook's slide-down transition is that it starts at the bottom of the banner (which is what I'm trying to accomplish) unlike normal transitions which start at the edge of the display. I would also like the banner to be focusable after the transition occurrs so that I can transition back to the original screen.

 

Does anyone know how to do this?

 

Thanks before.

Retired
Posts: 856
Registered: ‎07-15-2008
My Device: Passport
My Carrier: Bell

Re: Facebook Like Slide-Down Transition

While I explore this with some internal contacts, I'd suggest that the way this is done is with a PopupScreen. This class allows you to overlay a partial screen and position it as needed. You can use the Animation API in 6.0+ to assist with the slide transition.

Tim Windsor
Open Source Technical Lead
Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: Facebook Like Slide-Down Transition

Tim, a side effect of the Popup screen would be that the banner underneath would NOT be useable.  I I think the original poster wanted to be able to click on the banner to transition back.

 

Yes I've looked at creating something similar and can't think of a simple approach!

Developer
Posts: 34
Registered: ‎08-11-2011
My Device: BlackBerry Bold
My Carrier: Axis

Re: Facebook Like Slide-Down Transition

Hi, thanks for your reply.

 

The application I was working on required OS 5.0 compatibility so I don't think I could have used the Animation API you were refering to. In the end I somewhat managed to achieve this in by using 2 screens, with a clickable banner on top of each screen. The banner on the content screen, when clicked, would push the menu screen onto the display stack. Onced pushed, I would then apply a slide down animation by adjusting the vertical position of the menu screen's content and redrawing it on a background thread.

 

Although it's not best practice, it did give me the desired interface I was looking for. If you have another way of doing this, I would still be interested in hearing about it.

 

Thanks. =D

Retired
Posts: 856
Registered: ‎07-15-2008
My Device: Passport
My Carrier: Bell

Re: Facebook Like Slide-Down Transition

Well that's a pretty reasonable implementation I think. A PopupScreen is not much different in reality. Peter is right that you end up having to capture inputs and pass them along or handle them yourself in somewhat messy ways, but that's really the way it's done with these sorts of things. It's all a bunch of crazy tricks behind the scenes.

Tim Windsor
Open Source Technical Lead
New Developer
Posts: 11
Registered: ‎12-08-2012
My Device: device
My Carrier: airtel

Re: Facebook Like Slide-Down Transition

[ Edited ]

Hello @alfonsn..As per your suggestion i was able to make such approach but still not getting some way to slide down effect after banner..
In my case slide down and up overlapping banner of below screen..
Can you post some code for the same?