Android 5 screen glitch/static with Google Maps Fragment inside a Viewpager

为君一笑 提交于 2019-12-05 22:33:17

Add:

android:hardwareAccelerated="false"

to your Activity or Application manifest entry. This workaround disables hardware accelerated graphics, so don't take this lightly. There is at least one bug report into Google for similar visual glitches to yours, hopefully they get this resolved quickly.

I wouldn't recommend putting this into a shipping app, only to prove or disprove that your drawing glitches are due to problems with the underlying hardware acceleration system.

You can also try disabling hardware acceleration at the View level via:

view.setLayerType(View.LAYER_TYPE_SOFTWARE, null);

in particular if you have WebView's, setting layer type to software on WebView's in my app went a long way towards resolving UI glitches.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!