Hello,
This is my first android application. I'm just trying to display different pages using a TabHost control. This code does the trick displaying a small html notification when a tab is changed while the page loads:
This code works if the previous page is fully loaded, but if it is still loading it will not display the "loading..." html while changing tabs. I belive I could force the control to cancel the activity using the stopLoading method in the original WebView control.
Erel, do you think you can expose that method in B4A?
Would it be possible to have a version of the updated library with the method before it is officially released?
Thank you very much for providing such an easy to use and powerful environment for android development!
Greetings from Spain,
Enrique
This is my first android application. I'm just trying to display different pages using a TabHost control. This code does the trick displaying a small html notification when a tab is changed while the page loads:
B4X:
Sub tabs_TabChanged
Select tabs.CurrentTab
Case 0
wvOdin.LoadHtml("<html><body><H1>Loading google..</h1></body></html>")
DoEvents
wvOdin.LoadUrl("http://www.google.es/")
Case 1
wvOdin.LoadHtml("<html><body><H1>Loading page..</h1></body></html>")
DoEvents
wvOdin.LoadUrl("http://www.eltiempo.es/")
Case 2
wvOdin.LoadHtml("<html><body><H1>Loading page...</h1></body></html>")
DoEvents
wvOdin.LoadUrl("http://www.filetopia.org/")
End Select
End Sub
This code works if the previous page is fully loaded, but if it is still loading it will not display the "loading..." html while changing tabs. I belive I could force the control to cancel the activity using the stopLoading method in the original WebView control.
Erel, do you think you can expose that method in B4A?
Would it be possible to have a version of the updated library with the method before it is officially released?
Thank you very much for providing such an easy to use and powerful environment for android development!
Greetings from Spain,
Enrique