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: 660
Registered: ‎10-08-2009
My Device: Bold 9900
My Carrier: Telus
Accepted Solution

ActivityIndicator size

[ Edited ]

Just wondering, does ActivityIndicator have preset size like they do in bbui.js?

 

I can't find any documentation on this so I have tested and found the max size to be 200px in width and height and if the size is increased any more, it just adds padding to the control.

 

Can someone help me please

 

Edit: 184px is the minimum for the large ActivityIndicator and there is a steep drop off from 183px

----------------------------------------------------------
Twitter: @gyubok
Highlighted
Developer
Posts: 889
Registered: ‎08-31-2009
My Device: 9530, 9630, 9800, 8530, 9900, 9810, 9930, PlayBook, Dev Alpha
My Carrier: Verizon

Re: ActivityIndicator size

ActivityIndicator always has one of three preset sizes (whichever is the largest that will fit in it's given space). If you need a larger one, you may want to try scalling the container...


Read my thoughts on BlackBerry Development at news.ebscer.com
Developer
Posts: 660
Registered: ‎10-08-2009
My Device: Bold 9900
My Carrier: Telus

Re: ActivityIndicator size

How do I force large preset size?

----------------------------------------------------------
Twitter: @gyubok
Developer
Posts: 889
Registered: ‎08-31-2009
My Device: 9530, 9630, 9800, 8530, 9900, 9810, 9930, PlayBook, Dev Alpha
My Carrier: Verizon

Re: ActivityIndicator size

Just give the ActivityIndicator a large enough preferredHeight and Width. My code is...

 

ActivityIndicator
    {
        id: loader
        preferredHeight: 500
        preferredWidth: 500
        verticalAlignment: VerticalAlignment.Center
        horizontalAlignment: HorizontalAlignment.Center
    }

 (although a size of 200 would probably be sufficient).


Read my thoughts on BlackBerry Development at news.ebscer.com
Developer
Posts: 660
Registered: ‎10-08-2009
My Device: Bold 9900
My Carrier: Telus

Re: ActivityIndicator size

The code you provided works fine for most cases but I find that if you are adding a label above or below the ActivityIndicator to describe event (i.e. "Loading Contacts"), providing 500px will add considerable amount of gap between the two controls. Ofcourse, you can decrease the preferredHeight and width but that's not a clean way to layout the two controls.

 

I just thought there would be a way to provide the size of the ActivityIndicator just like how we provide text sizes but I guess there isn't a way. Perhaps I should've been more clear on my initial question

 

Currently, a large ActivityIndicator is 184px height and width if anyone is interested. I don't like hardcoding dimensions but we have no choice and I don't have time to find out dimensions for medium or small ActivityMonitor

----------------------------------------------------------
Twitter: @gyubok