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

Native Development

Reply
Developer
Posts: 55
Registered: ‎12-04-2012
My Device: Q10
My Carrier: Verizon

Push a page/sheet with Transparent Background?

Hey All

 

was just trying to figure out how one could push a sheet or page with a transparent background on TOP of a navigation pane(as to still see parts of the Nav Pane?

 

I think that could look pretty cool, and it would definitely open the door for some clever UIs...but I am a noob, therefor my reach is limited. If any of you geniuses know how to do this please help, thanks!! Smiley Happy

 

-Ali

 

 

 

 

 

Developer
Posts: 1,524
Registered: ‎12-18-2012
My Device: Z30, Z10 LE, DevAlpha C, PlayBook

Re: Push a page/sheet with Transparent Background?

What first comes to mind is creating a container, setting it's X coordinate to screenWidth using AbsoluteLayout then making it slide into the screen with animation.

Andrey Fidrya, @zmeyc on twitter
Developer
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: Push a page/sheet with Transparent Background?

If it's possible, simply setting the background to transparent on the Container which you'd likely have as the top-level child would work. "background: Color.Transparent" would do that.

If that won't work, note that the Dialog class is inherently a mechanism with a transparent background, and you should be able to populate it much like a Page, and presumably animation its appearance onscreen similarly too.

Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Developer
Posts: 55
Registered: ‎12-04-2012
My Device: Q10
My Carrier: Verizon

Re: Push a page/sheet with Transparent Background?

Thanks!!! I will try your suggestions, Peter. I think that will be best for what I am trying to accomplish. I will play around with it for a bit and return to mark a solution.... or expand on my question Smiley Happy thanks for the responses!!

 

-Ali

Developer
Posts: 55
Registered: ‎12-04-2012
My Device: Q10
My Carrier: Verizon

Re: Push a page/sheet with Transparent Background?

hmm... I think for what Im doing I would definitely need the item with the transparent BG(see through to the nav) to be a sheet or pushed page. best example I can think of:

 

at app open, a navigation page launches and an image of a flower animates upward

on touch nav pushes a tabbed pane up that has an image of a window as the body and you can see through it to said flower.

 

I found:

when I simply duplicate the animation and place it behind the window(in the pushed tabbed pane), you can tell the flower is indeed a duplicate due to the fact it moves during the "push" animation AND the animation stars over

 

I guess a solution would be if there was a way  to:

1. remove the default "push/pop" transition-animation and make a custom one

2. have two pages animations begin simultaneously(even if we havent pushed to them yet)

3. disable animation stop on tab change

 

do you know if any of these are possible?

 

 

thanks

-Ali

Developer
Posts: 262
Registered: ‎07-13-2012
My Device: PlayBook, DA B, DA C, LE Z10 #102, Q10, Z30
My Carrier: T-Mobile

Re: Push a page/sheet with Transparent Background?

If you only want to allow the user to interact with the new "page" on top (meaning the part that can still be seen doesn't allow touch events) you can have a dialog pop up that doesn't fill the whole screen. Not sure if this will help for your situation but thought I'd throw it out there.
---
Check out my BB10 Cascades Coding site: BBcascades.com & Cascades Blog: bbcascadescode.tumblr.com

My Built for BlackBerry app: The Dive Plan
Developer
Posts: 55
Registered: ‎12-04-2012
My Device: Q10
My Carrier: Verizon

Re: Push a page/sheet with Transparent Background?

wait, so I can actually put pages within a dialog pop-up. I played with the "Dialogs" sample app, but I couldn't get it to give me any options beyond  title, label, text... Is there something I have to do in the c++ file, or can I do it all in QML?