#Region Activity Attributes
#FullScreen: True
#IncludeTitle: True
#End Region
Sub Process_Globals
End Sub
Sub Globals
Private webpage As WebView
Private WebViewSettings1 As WebViewSettings
Private WebViewExtras1 As WebViewExtras
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("web")
websetting
Dim Url As String
Url = "https://apdm.moe.gov.my"
webpage.LoadUrl(Url)
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub websetting
WebViewSettings1.setDefaultZoom(webpage, "FAR")
WebViewSettings1.setLoadWithOverviewMode(webpage, True)
WebViewSettings1.setUseWideViewPort(webpage, True)
WebViewSettings1.setDisplayZoomControls(webpage, False)
WebViewExtras1.addWebChromeClient(webpage,"B4A")
webpage.JavaScriptEnabled=True
End Sub
Sub WebView1_OverrideUrl (Url As String) As Boolean
If Url.indexof(".pdf")>0 Or Url.IndexOf(".doc")>0 Or Url.IndexOf(".docx")>0 Or Url.IndexOf(".zip")>0 Then
Dim p As PhoneIntents
StartActivity(p.OpenBrowser(Url))
Return True
Else
Return False
End If
End Sub