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
dbigham
Posts: 466
Registered: ‎04-01-2009
My Device: Z10, PlayBook
My Carrier: NA

Re: Scrolling Container

Thanks Dustin!  I look forward to trying this out sometime soon and getting back to you with how I make out.

 

Thanks,
Daniel

Please use plain text.
New Contributor
AdjectiveAlex
Posts: 3
Registered: ‎10-30-2012
My Device: Playbook
My Carrier: NA

Re: Scrolling Container

[ Edited ]

At least the first example works. However, no matter what I try, I can't get a Container to scroll horizontally.

 

I've tried setting the scroll direction to ScrollDirection.BOTH and ScrollDirection.HORIZONTAL. I've tried using scrollToX and scrollX. Nothing seems to work.

 

Edit:

 

I finally figured it out. If you want a Container to scroll horizontally, you have two options:

 

1) Use a GridLayout

2) Use a RowLayout and set its type to RowLayoutType.VERTICAL. Seems a bit antithetical, but I'm sure there's a reason for it.

Please use plain text.
Developer
dbigham
Posts: 466
Registered: ‎04-01-2009
My Device: Z10, PlayBook
My Carrier: NA

Re: Scrolling Container

Dustin, I finally got around to trying your sample code tonight and it worked, thanks.  Perhaps the key is waiting until the added to stage event fires before laying things out?

 

One minor disappointment is scrolling FPS.  I have a single label on the screen, and an image behind it (not in the container), and an action bar at the bottom. My label is about 3 screens high. Scrolling performance doesn't seem to be anywhere near 60 fps :smileysad:

Please use plain text.
Developer
jtegen
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: Scrolling Container

Rendering text can be a little slow. If you just had some drawing in the container, is it fast then? What happens when the text is "normal" height? Is the slow frame rate due to the oversized text or the scrolling?
Please use plain text.
Developer
dbigham
Posts: 466
Registered: ‎04-01-2009
My Device: Z10, PlayBook
My Carrier: NA

Re: Scrolling Container

In addition to my previous reply about terrible scrolling performance (about 15 fps), the scrolling isn't actually working dependably for me.

 

It's super glitchy. Sometimes when I swipe my finger, it scrolls. Sometimes it just "bounces back" when I release my finger. Sometimes when I scroll to the end, it gets stuck there and just keeps bouncing back when I try and scroll up. Sometimes when I scroll up, it goes 90% of the way, but then gets "stuck" again before making it to the top.

 

I can madly keep scrolling and then sometimes, randomly, it will "release" and let it scroll back up to the top, etc.

 

It would be pretty embarassing releasing my Help screen to users like this.

Please use plain text.
Developer
apman
Posts: 193
Registered: ‎11-12-2010
My Device: Not Specified

Re: Scrolling Container

Could it be that your text field is selectable or anything else in front intercepting the mouse events? I use read-only TLF text inside a container as content for the scrolling container, and it scrolls pretty smoothly and certainly reliably.

 

 


My app : Get set - Get up!   Get ready for the snooze revolution.

 

Please use plain text.
Contributor
analytik
Posts: 35
Registered: ‎08-02-2012
My Device: Q10
My Carrier: EMT (Estonia)

Re: Scrolling Container

Also, This still doesn't work if you have a GridLayout and a List inside that container. Like.... seriously.
Please use plain text.