Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Dim webview As WebView
Dim wex As WebViewExtras
End Sub
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
'Activity.LoadLayout("Layout1")
webview.Initialize("wv")
wex.addJavascriptInterface(webview, "B4A")
wex.addWebChromeClient(webview, "wex")
Activity.AddView(webview, 0%x,0%y,100%x,100%y)
webview.LoadHtml(File.ReadString(File.DirAssets,"color.html"))
Sleep(10000) ' to give you time to look at your device
' wex.executeJavascript( webview, "document.getElementById('omo').style.color='green';")
wex.executeJavascript( webview, "document.getElementById('colorbutton').click();")
End Sub