Android WebView - 点击时抖动/更改
我目前正在开发一个需要使用 WebView 的应用程序。它基本上占据了整个屏幕空间。
最初,WebView 内的图像看起来精美且高质量。不幸的是,当用户点击(并按住)网络视图中的按钮时,图像会失去质量并抖动,直到松开手指。有什么办法可以禁用这个吗?
值得注意的是,我的应用程序不需要任何滚动。我认为 Android 只会降低滚动质量以获得更好的性能。
I am currently working on an application that requires the use of a WebView. It basically takes up the entire screen space.
Initially the images inside of the WebView look fine and high quality. Unfortunately, when a user taps (and holds) a button in the webview, the images then lose quality and dither until the finger is released. Is there any way to disable this?
A good note, my app does not need any scrolling whatsoever. I thought Android would only lower the quality on scroll to better performance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
唯一的解决方案是制作自己的图像查看器,网络视图以较低质量重新采样图像
the only solution is to make your own image viewer, the webview resamples images at lower qualities
我已经处理同样的问题很长时间了。最好的解决方案是将图像拆分为多个子图像,并将它们一起加载到同一个
html
文件中。我发现最简单、最快的解决方案是使用 Adobe Photoshop:
这样,只要将任何图像分割成足够多的部分,您就可以避免抖动,
I've been dealing with the same issue for a long while. The best solution is to split the image into several sub-images and load them altogether within the same
html
file.The easiest and fastest solution I found is with
Adobe Photoshop
:With this, you'll avoid dithering with any image as long as you split it into enough pieces,