在棒棒堂的Andr​​oid SystemUI故障棒棒、故障、oid、Andr

2023-09-12 06:23:53 作者:长不过执念短不过善变

这个错误的仅发生在我的Nexus 5和我的Nexus 7运行的棒棒堂

This bug only occurs on my Nexus 5 and my Nexus 7 running Lollipop.

修改

这个错误也出现在新的收件箱应用通过谷歌,当我进入的收件箱>设置>通知>的任何项目并返回 ...

This bug also occurs in the new Inbox app by Google, when I'm going into Inbox > Settings > Notifications > any item and go back...

/修改

compileSdkVersion 21 buildToolsVersion 21.1.1 编译com.android.support:appcompat-v7:21.0.2

我有一个 GalleryActivity 显示多个图像,每页一次(一个 ViewPager 。当我内心点击后退按钮,有时Android的SystemUI有毛刺。

I'm having a GalleryActivity that shows multiple images, once per page (inside a ViewPager. When I hit the back button, sometimes the Android's SystemUI have glitches.

普通视图

Glitched视图

请参阅如何看法重复自己,而系统本身?里面

See how the views repeats themselves, and inside the system itself?

有一个简单的触摸事件带回正常SystemUI意见。

A simple touch event brings back the normal SystemUI views.

这是怎么回事?

可能类似于:

Android的5屏故障/静态与谷歌地图片段Viewpager 里面 Android的棒棒糖活动屏幕损坏 Android 5 screen glitch/static with Google Maps Fragment inside a Viewpager Android Lollipop Activity Screen corrupted

推荐答案

设置安卓hardwareAccelerated =假是一种极端的解决方案,图形性能可能是非常糟糕的。

Setting android:hardwareAccelerated="false" is a kind of extreme solution, as graphical performance is likely to be very bad.

如果你能找出是行为不当,造成这个问题的看法,一个更好的解决将是它通过 setLayerType() ,如:

If you can pinpoint the view that is misbehaving and causing this issue, a better fix would be to switch it to software rendering instead, via setLayerType(), e.g.

view.setLayerType(View.LAYER_TYPE_SOFTWARE, null);

有趣的是,我没有经历过任何渲染毛刺棒棒糖,到目前为止,但我们没有看到他们在奇巧(如上文的这个问题),只有当 WebViews 在屏幕上present。

Funny thing is, I haven't experienced any rendering glitches with Lollipop so far, but we did see them in KITKAT (as mentioned in this question), and only when WebViews are present on the screen.

我会建议对不同意见切换,直到问题被隔离(尤其是如果它很容易繁殖)的实验。

I would recommend experimenting with toggling this on different views until the problem is isolated (especially if it's easy to reproduce).

到目前为止,这一问题的每一次出现已经涉及到WebViews(或使用的WebView,如AdMob的组件)。据的AOSP问题跟踪在解决问题在安卓5.0,但它似乎并不如此。

So far, every occurence of this issue has been related to WebViews (or components that use WebView, such as AdMob). According to the AOSP Issue Tracker the problem is fixed in Android 5.0, but it doesn't seem to be the case.