FokkeZB / nl.fokkezb.loading

The widget provides a simple loading mask that can be easily styled and configured.
93 stars 18 forks source link

Loading doesn`t shown in NavigationWindow #32

Closed abada closed 8 years ago

abada commented 8 years ago

This an example

alloy.js

Alloy.Globals.loading = Alloy.createWidget("nl.fokkezb.loading");

.xml

<NavigationWindow animationCenter="true" modal="true" id="nav_cart" platform="ios">
        <Window id="cart_win" title="Cart">
            <Require src="cart/shared_cart_template" id="shared_cart_template" type="view" />
        </Window>
    </NavigationWindow>

.js

Alloy.Globals.loading.show('Your message');

I solved it by

.xml

<Widget src="nl.fokkezb.loading" name="view" id="my_loading" />
$.my_loading.show('loading ...');

The problem is from a global instance of the widget in alloy.js

FokkeZB commented 8 years ago

The issue is that you've set the NavWin to be modal. I've added a note about this:

https://github.com/FokkeZB/nl.fokkezb.loading/blob/master/README.md#view