Sub Globals
Dim WebView1 As WebView
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("1")
LoadHtml($"This is an <a href="?example">example</a>.<br>"$)
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub LoadHtml(Html As String)
WebView1.LoadHtml(Html)
End Sub
Sub WebView1_PageFinished (Url As String)
Log("Uri: " & Url)
If Url.Contains("?") Then
Dim word As String = Url.SubString2(Url.IndexOf("?")+1, Url.Length)
Log("Word: " & word)
SearchFromDB(word)
End If
End Sub
' For testing purposes only
Sub SearchFromDB(word As String)
If word.EqualsIgnoreCase("example") Then
LoadHtml($"<b>${word}</b> <font color=grey>[ ig-zam-puhl, -zahm- ]</font><br><br>a thing characteristic of its kind or illustrating a <a href="?general">general</a> rule."$)
Else If word.EqualsIgnoreCase("general") Then
LoadHtml($"<b>${word}</b> <font color=grey>[ jen-er-uhl ]</font><br><br>affecting or concerning all or most people or things; <a href="?widespread">widespread</a>."$)
Else If word.EqualsIgnoreCase("widespread") Then
LoadHtml($"<b>${word}</b> <font color=grey>[ wahyd-spred ]</font><br><br>found or distributed over a large area or number of people."$)
End If
End Sub