Search code examples
cssibm-mobilefirstworklight-studio

Worklight busy indicator resize


The busy indicator getting resized on orientation change in IOS. Is there a way, we can give fixed height and width for the busy indicator?


Solution

  • You can look at the following question: IBM Worklight 6.0 - Does WL.BusyIndicator support text wrapping for iOS?

    For example:

    var busy = new WL.BusyIndicator(null, {
        text: "Ouverture de session",
        boxLength: 170 // Play with this value to change the size of the indicator 'box'.
    });
    busy.show();
    

    However, this unfortunately does not "translate" well when changing to landscape mode...

    What you could do is:

    • Look at other indicator solutions, provided for example by jQuery Mobile or jQuery plug-ins
    • Detect orientation change in native code and then hide the busy and re-show it based on a recalculations..

    You should probably go with the first option...
    Note though this this means you cannot use WL.BusyIndicator.show/hide; you'll need to use the API provided by the plug-in.