Sub Globals
Dim label1 As Label
Dim wvinfo As WebView
Dim wveInfo As WebViewExtras
Dim infoHTML As String
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("webview1")
wveInfo.Initialize (wvinfo)
infoHTML = "<html><head><style>body {font-size: 18px;}</style></head><body>Initial text. Initial text. Initial text. Initial text.</body></html>"
wvinfo.LoadHtml(infoHTML)
End Sub
Sub wvinfo_pagefinished (url As String)
Sleep(100)
label1.Text = "Height: " & wveInfo.GetContentHeight & " - Scale: " & wveInfo.GetScale
wvinfo.Height = wveInfo.GetContentHeight * wveInfo.GetScale
End Sub
Sub Font22_Click
infoHTML = "<html><head><style>body {font-size: 22px;}</style></head><body>In this Case the height of the WV increases. <b>It Is right.</b> In this Case the height of the WV increases. <b>It Is right.</b></body></html>"
wvinfo.LoadHtml(infoHTML)
End Sub
Sub Font18_Click
infoHTML = "<html><head><style>body {font-size: 18px;}</style></head><body>In this Case the height of the WV does Not decrease. <b>It Is incorrect.</b> In this Case the height of the WV does Not decrease. <b>It Is incorrect.</b></body></html>"
wvinfo.LoadHtml(infoHTML)
End Sub