How can I display a waiting icon while the application is downloading data?

Hi,

I am issuing a network.request() in a business application.

The initial connect and display takes several seconds.

How can I specify to the app do display a “busy” icon (or spinning wheel) from the start of the download until the completion of the download?

Thanks

Herb

You could create your own object and update its “rotation” property every frame if you want a custom icon. If you want to use the OS’s own spinner, then use this function:

--turn spinner on native.setActivityIndicator( true ) --turn spinner off native.setActivityIndicator( false )

Turn it on when you make the request, and turn it off when you have completed your download.

And there is a widget.newSpinner() call too that you can use.

Rob

Thanks Both!

I will check these out.

Herb

You could create your own object and update its “rotation” property every frame if you want a custom icon. If you want to use the OS’s own spinner, then use this function:

--turn spinner on native.setActivityIndicator( true ) --turn spinner off native.setActivityIndicator( false )

Turn it on when you make the request, and turn it off when you have completed your download.

And there is a widget.newSpinner() call too that you can use.

Rob

Thanks Both!

I will check these out.

Herb