My app contains two activities: the first(selector) uses regular widgets(RecyclerViews,buttons etc), second(game) draws most of its content via GLSurfaceView
with gl conext version 2:
setEGLContextClientVersion(2);
It runs fine on api level 23, however when I run it on api level 19 happens following:
When I start app from scratch the selector activity runs fine:
When I start game activity it runs without visible glitches too, but when I go back to selector I see following:
And its not just background color whole activity behaves very unstable.If I exit from app and start it again glitches persist.The only way to get rid from them is to force stop the app from settings menu.I'm pretty sure there is problem with opengl context because glitches won't occur if I don't create gl surface.
The problem was due to this line in the manifest:
android:hardwareAccelerated="true"
Changing it to false
solved the issue.