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

Adobe AIR Development

Reply
Developer
Posts: 80
Registered: ‎03-17-2011
My Device: Playbook Tablet
My Carrier: -
Accepted Solution

Playbook like view

Hi, I'm building a new app, and would like some advice.

 

Basically what I'd like to accomplish, is a view that gets populated dynamically with items coming from the DB.

 

Almost like the Playbook's main home screen, where you have 6 columns with three items (apps) in each, totaling 18 items (until you scroll down, but I;m not looking to have this functionality)

 

I wouldn't want to build my view with 18 static slots, but make it so it "knows" how many items came back from the database and fill up the gaps.

 

An example to that, is if you have a playbook in hand, and go to the Media tab. You will only have a few items in there, but as soon as you install an extra item, it automatically displays. What I'm trying to accomplish is exactly the same. I just want to start with an empty canvas, and have new items added as they become available on the DB.

 

I'm sure there must be a simple way of doing that, but my limited knowledge is stopping me from going any further.

 

Could anyone please shed me a light, and possibly give me an example?

 

Thanks in advance 

Marcos Placona
www.placona.co.uk
My Playbook Apps:
Bonjour | Time Traveller | Magic Ball
Developer
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: Playbook like view

I'd just use a TileList with a custom CellRenderer.  Pretty sure you'll find examples in the forum or on the web of doing that.

 

The "automatically display" part is handled already, if you simply update the data in the associated DataProvider or do it through the list component itself.


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: 80
Registered: ‎03-17-2011
My Device: Playbook Tablet
My Carrier: -

Re: Playbook like view

[ Edited ]

Awesome, I knew it was gonna be something simple. Thanks!!!!

 

Now, just to reuse the same topic. I can't seem to be able to make the tiles background transparent. Is it not possible?

 

UPDATE:

Think i figures the transparent background on my own. If on my cellRenderer I do:

 

this.skin.visible = false;

 

It then hides everything, and just show the contents of my tile

Marcos Placona
www.placona.co.uk
My Playbook Apps:
Bonjour | Time Traveller | Magic Ball
Highlighted
Developer
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: Playbook like view

That should do it. I think you could also just supply a custom skin that basically doesn't display anything, like a Shape with nothing drawn on it, but this seems even easier.

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!