Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
311 views
in Technique[技术] by (71.8m points)

Android SystemUI glitches in Lollipop

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

EDIT

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

/EDIT

  • compileSdkVersion 21
  • buildToolsVersion 21.1.1
  • compile 'com.android.support:appcompat-v7:21.0.2'

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.

Normal view

normal

Glitched view

glitched

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

A simple touch event brings back the normal SystemUI views.

What is going on?

Might be similar to:

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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

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);

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).


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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

56.9k users

...