Is there any real - production ready solution to set and control from Cocos2d-x Immersive mode?
We trying to call our function hideSystemUI() in oncreate method:
@TargetApi(Build.VERSION_CODES.KITKAT)
private void hideSystemUI()
{
if (Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.KITKAT) {
glSurfaceView.setSystemUiVisibility(
Cocos2dxGLSurfaceView.SYSTEM_UI_FLAG_LAYOUT_STABLE
| Cocos2dxGLSurfaceView.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
| Cocos2dxGLSurfaceView.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
| Cocos2dxGLSurfaceView.SYSTEM_UI_FLAG_HIDE_NAVIGATION
| Cocos2dxGLSurfaceView.SYSTEM_UI_FLAG_FULLSCREEN
| Cocos2dxGLSurfaceView.SYSTEM_UI_FLAG_IMMERSIVE_STICKY);
}
}
But it seems not wroking properly, on first run from console everything seems working, but when we launching app from phone we get black line on screen bottom where should be Android keys. Can someone give us real example for cocos how to implement this properly?