Android WebView: Very laggy button response

后端 未结 4 2006
旧巷少年郎
旧巷少年郎 2020-12-29 13:49

I\'ve got a little web app that I made to play with Android\'s WebView functionality.

I\'ve got some divs that I use as buttons (with onclick attributes

4条回答
  •  鱼传尺愫
    2020-12-29 14:42

    So, WebView holds each tap event to see if it's a double tap or a touch move event. There is an alternative to binding to touchstart events. If you specify with the viewport meta directive that your WebView shouldn't zoom or scroll, touch events will reach your code immediately (since Gingerbread).

    You can find the details on the viewport directive here: http://developer.android.com/guide/webapps/targeting.html

提交回复
热议问题