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

Web and WebWorks Development


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
Highlighted
Contributor
Posts: 21
Registered: ‎09-09-2011
My Device: developer
My Carrier: developer
Accepted Solution

Webworks BB10 bbUI Activity indicator initially hidden. How to?

I need the initial state of an activity indicator to be hidden.

 

A form where user wil enter some data, one of fields will be the current user location, so the app will capture the geolocalizaion. During this process the activity indicator will be shown. Once the capture has finished the activity indicator will be set to hidden.

 

The activity indicator declaration is:

    <div id="my_indicator"
      data-bb-type="activity-indicator"
      data-bb-size="medium">
    </div>        
   

In javascript the ondomready event triggers:

 

   pub.onDomReady = function () {
           document.getElementById('myindicator').hide();
    };

 

This works but for the very first moment the activity indicator is shown and it is wrong as no data request or query is being performed so there is no need to show on the screen an activity indicator.

 

  I think the solution is to set the indicator as hidden. Question is how.

 

  Is there any way  to achieve the desired behaviour.

 

 

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

Re: Webworks BB10 bbUI Activity indicator initially hidden. How to?

Have you tried "display:none" as an attribute in the div?
Contributor
Posts: 21
Registered: ‎09-09-2011
My Device: developer
My Carrier: developer

Re: Webworks BB10 bbUI Activity indicator initially hidden. How to?

Had tried:

 

<div id="my_indicator" disabled

     .....

</div>

 

and also

 

CSS:

#my_indicator {
    margin: auto;
    margin-top: 50px;
}

Same result. Activity is shown.

 

 

Tnx for your reply

 

 

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

Re: Webworks BB10 bbUI Activity indicator initially hidden. How to?

<div id="my_indicator" style="display:none" />
should work.
Contributor
Posts: 21
Registered: ‎09-09-2011
My Device: developer
My Carrier: developer

Re: Webworks BB10 bbUI Activity indicator initially hidden. How to?

It works!

Thanks a lot.

 

PS: Also works adding in the onscreenready:

  document.getElementById('activity').style.display = 'none';