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: 207
Registered: ‎02-10-2011
My Device: Playbook 16GB and Z10
My Carrier: Verizon

List CellRenderer Skinning and Webview?

Hello All!

 

I am a new developer to the AIR, ActionScipt and Flex world but very determined.  I am trying to get my app finished before the March 15 deadline and I've hit a couple snags.

 

Mainly, List custom CellRendering and displaying websites in a container (not as important currently but will be after I get the skinning done).

 

I have done my searching and come across a couple great articles

http://supportforums.blackberry.com/t5/Tablet-OS-SDK-for-Adobe-AIR/Flex-for-the-BlackBerry-PlayBook-... - great tutorial on building a directory in Flex

http://blog.digitalbackcountry.com/2011/01/creating-custom-list-skins-for-the-blackberry-playbook/ - great tutorial on building a custom cell renderer for lists

 

These tutorials are great for giving example code snippets but I would like to download source code and load it into Flash Builder and then execute it on the simulator that way I can see the structure and flow of the code and better understand how to build my project.  If anyone has an app that does some or all of the following things and they either have their app open source or don't mind sharing parts of their source that run on their own in the simulator that would be IDEAL and greatly appreciated.

 

I am building an app that interacts with a website and has the following functions:

- Submit data to the site via button clicks

- User login

- List articles by title, author and if there is a thumbnail display that in the list as well

- The items in the list when clicked load either text or webpages

 

But this thread I want to focus on building a List that has a custom CellRenderer that will give each cell, buttons that submit data, show pictures if they exist, titles and authors.  For example, I have been developing a similar app for the webOS and this is what the list I am hoping to achieve looks like (some of you might know what website I'm talking about)

 

 

(The arrows are the buttons)

 

In summary, if anyone has source code, knows of source code, or can give me working projects that I can download and load into the simulator that demonstrates how to do the CellRendering where I can display something similar to the custom skins tutorial that would be awesome!  If not could you point me in the right direction by giving me some references to other tutorials or even code snippets of how you would try to implement parts of it would also be helpful.

 

If I get my app to the point where I can pull off the 4 items above and submitted before March 15 I will open source my app to not only help development further but to be used as an example for anyone trying to build an app with a similar function for the PlayBook.

 

Thank you to anyone who replies!

_________________________________________________
Apps
Go Music
Flashlight Fast Free/Pro
Fitbit for BlackBerry PlayBook
Developer
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: List CellRenderer Skinning and Webview?

It is best to submit a specific problem that can be addressed vs. asking for a full application with code that does what you are asking.  There are numerous threads that covers making custom renderers for lists.  In this specific case, you will need to:

 

  • Increase the rowHeight for each cell
  • Add attributes for an Image for thumbnail and both arrows, and labels for the number, description and source.
  • Override onAdded and onRemoved to put on and take of these resources
  • Overrride drawLabel to set and position data.
  • On the description, make certain you allow word wrap to occur

 

So you will need to manage how data is accessed and managed.  We can give advise, but we cannot make those decisions for you.

 

Give at shot form what is available, and then post if you get stuck.

Developer
Posts: 165
Registered: ‎10-26-2010
My Device: BlackBerry® PlayBook™
My Carrier: .

Re: List CellRenderer Skinning and Webview?

The tutorial from Ryan Stewart that you posted should contain everything you need. He specifically adds two lines of text and an image, so that's covered in full. He doesn't explain adding a button to the cell renderer, but you add them just like anything else.

 

Ryan's method was the only one I was able to use that worked properly and consistently. Overriding drawLabel or draw from one of the included CellRenderers caused list refreshing issues while scrolling (data scrambled and items did not retain proper order). Also the List would only show half of my data, and repeated that half to fill the correct number of items.

Highlighted
Developer
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: List CellRenderer Skinning and Webview?

Yes, I hope they (BB) resolve the QNX list and renderer issues.  I have had to write a lot of code to get around the odd behavior and improper updates and refreshes that occurs.  It is still not 100%, but I hope the final SDK will make the List behave as any one would expect.  I dont know if it is bad design or bad implementation.  Adobe Flex/AIR lists and renderers work just fine.