Loading Dialog is a native extension to create and control loading dialogs on Android. Using the extension is possible to create the dialog and customize it to fit the application needs, such as decide if it is cancelable by the device back button or not.  It’s also possible to optionally create a BitmapData and send to the extension to show on the dialog.

The extension also has methods to create classic or progressive dialogs, as well as the ability to set the title, the message and the position of the dialog.

Sample

var _ex:Loading = new Loading();

// optionally set a listener to see when the dialog is closed!
_ex.addEventListener(LoadingEvent.DIALOG_CANCELED, onDialogClosed);

// check doc files to see how you can set the position of the dialog and even set a custom BitmapData!
_ex.showLoading("title", "loading message..."); 

// close the dialog when you don't need it with the following method
 _ex.hideLoading();

function onDialogClosed(e:LoadingEvent):void {
    trace("dialog closed");
}

// Progressive

// check doc files to see how you can set the position of the dialog and even set a custom BitmapData!
// in this example we have set 100 as the max value and 10 as the current value
_ex.showProgressiveLoading("title", "loading message...", 100, 10); 

// if you want to change the value, add value to the current value.
// This value will be added to the previuse value the new value will be 10 + 10 = 20
 _ex.updateProgressiveLoading(10);
Air Native Extension, Android . URL.