You can use reflection to call findAll method. This method will highlight the results and return the number of items found.
B4X:
Sub Globals
Dim WebView1 As WebView
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("1")
WebView1.LoadUrl("http://www.b4x.com")
End Sub
Sub Activity_Click
Log(FindAll(WebView1, "Basic4android"))
End Sub
Sub FindAll (w As WebView, s As String) As Int
Dim r As Reflector
r.Target = w
Return r.RunMethod2("findAll", s, "java.lang.String")
End Sub
Using Erel's code in the previous post, it does not highlight any text. It logs the number of occurences of the search, but there is no text highlighting. What else is missing?
Thank you
@Erel: You are absolutely correct. I ran it on two OS 4.03 devices and both did not highlight the search. But then, after you mentioned it, I ran it on a an OS4.2 device and it did highlight the search.
Thank you