Show loading while native.showWebPopup is loading

Is there a way to show a loading status dynamic image while native.showWebPopup is loading?

You can use native.newWebView, I do the following:

-- show activity indicator native.setActivityIndicator( true ) websiteView1 = native.newWebView( display.contentWidth \* 0.5, 210 , display.contentWidth - 40, 400 ) websiteView1:request( theURL ) websiteView1:addEventListener( "urlRequest", websiteView1Listener )

And websiteView1Listener looks like this:

 function websiteView1Listener( event ) print "Entering: websiteView1Listener" if (event.type == "loaded") then print("URL: "..event.url) native.setActivityIndicator( false ) end end

Hope this helps! 

You can use native.newWebView, I do the following:

-- show activity indicator native.setActivityIndicator( true ) websiteView1 = native.newWebView( display.contentWidth \* 0.5, 210 , display.contentWidth - 40, 400 ) websiteView1:request( theURL ) websiteView1:addEventListener( "urlRequest", websiteView1Listener )

And websiteView1Listener looks like this:

 function websiteView1Listener( event ) print "Entering: websiteView1Listener" if (event.type == "loaded") then print("URL: "..event.url) native.setActivityIndicator( false ) end end

Hope this helps! 

Thank you very much for this very helpful posting, anshuman.

One small addition to your code: 

If you want to display the loading status every web request, you have to add an else statement to the listener. Otherwise it will be shown only the first request.

function websiteView1Listener( event ) print "Entering: websiteView1Listener" if (event.type == "loaded") then print("URL: "..event.url) native.setActivityIndicator( false ) else native.setActivityIndicator( true ) end end

Thank you very much for this very helpful posting, anshuman.

One small addition to your code: 

If you want to display the loading status every web request, you have to add an else statement to the listener. Otherwise it will be shown only the first request.

function websiteView1Listener( event ) print "Entering: websiteView1Listener" if (event.type == "loaded") then print("URL: "..event.url) native.setActivityIndicator( false ) else native.setActivityIndicator( true ) end end