WebView SimulateTouch

72 views
Skip to first unread message

Alan Hendry

unread,
Apr 6, 2021, 6:55:23 AM4/6/21
to DroidScript
Hi,
I have coded a simple SimulateTouch to touch a WebView,
but it doesn't seem to do anything.
Regards, ah

Steve Garman

unread,
Apr 6, 2021, 10:18:55 AM4/6/21
to DroidScript
I have never been able to get SimulateTouch to work with a webview at all
I just have assumed it doesn't work

If anyone can post some minimal code that activates anything in a webview using app.SimulateTouch(web ...) I would be delighted to try to extend it

Alan Hendry

unread,
Apr 6, 2021, 11:38:51 AM4/6/21
to DroidScript
Hi,
I tried adding SetTouchMode(true) but that doesn't seem to have any effect.
I found an old (2017) post "WebView and SimulateTouch" which says
   web view and simulate touch doesn't work for all devices
As far as I can tell the Webview is being touched (it fires it's own OnTouch) it just doesn't react (open links, etc).
To get correct x and y I have a separate webview with an ontouch where I get the first element of x and first element of y.
Regards, ah

Reply all
Reply to author
Forward
0 new messages