I have a full screen video using Exoplayer in a FullScreenActivity where status bar and navigation bar are hidden (from android >= 4.4).
When the activity is finished, I go back to last activity which is NOT a fullscreen (system ui is displayed) and 70% of the time I'm having a really strange issue on the system UI as follow :
Note that the image is the original one, so the white space on the right of the navigation bar is displayed on the phone.
This artefact disappear when another video play of when resuming the app. The top artifact correspond to the Toolbar + status bar. The artifact appear when fullscreen activity is fully fade out and finished.
Any sugestion or code request is welcome.
There is a known bug in WebView
(at least since KitKat) that sometimes causes these artifacts. It was filed in the Android bug tracker as this issue. Although they claim it's fixed in Android 5.0, that is not the case, though (at least from my experience) it's not quite as easy to reproduce as before.
In any case, the workaround is to use software rendering for the WebView
, via setLayerType()
:
webView.setLayerType(View.LAYER_TYPE_SOFTWARE, null);
Some related questions:
If you have a self-contained example that reproduces the bug, I would be very grateful if you could provide it to the guys at the AOSP Issue Tracker, in the link above.
This might be rendering problem and has been reported here
Setting your WebView
like so:
yourWebView.setLayerType(View.LAYER_TYPE_SOFTWARE, null);
can solve your problem.
来源:https://stackoverflow.com/questions/28237090/system-ui-statusbar-and-navigation-bar-render-artifact