Sub Globals
Private xui As XUI
Private WebView1 As WebView
Private we As WebViewExtras
Private p As B4XView
Private inProgress As Boolean
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("a")
ShowProgress
WebView1.LoadUrl("https://beisat.com/en/")
End Sub
Sub WebView1_PageFinished (Url As String)
we.executeJavascript(WebView1,"document.getElementsByClassName('customer-signin-module')[0].style.display = 'none';")
we.executeJavascript(WebView1,"document.getElementsByClassName('left-nav-trigger')[0].style.display = 'none';")
we.executeJavascript(WebView1,"document.getElementsByClassName('shopping-cart-module')[0].style.display = 'none';")
we.executeJavascript(WebView1,"document.getElementsByClassName('language-selector-wrapper')[0].style.display = 'none';")
p.SetVisibleAnimated(0,False)
p.RemoveViewFromParent
inProgress =False
End Sub
Sub WebView1_OverrideUrl (Url As String) As Boolean
ShowProgress
End Sub
Sub ShowProgress
If inProgress = True Then Return
inProgress = True
p = xui.CreatePanel("pnl")
p.Color = xui.Color_ARGB(150,255,255,255)
Activity.AddView(p,WebView1.Left, WebView1.Top, WebView1.Width, WebView1.Height)
p.SetVisibleAnimated(0,True)
End Sub
Sub pnl_Click
End Sub