black belt at the bottom of the screen - immersive mode, portrait mode, nexus device, android 6.0 bug
See original GitHub issueI have found a bug in libgdx:
Steps to reproduce
- You have to have nexus device, that does have on screen buttons (tested on nexus 5 and nexus 9), device must be running Android 6.0 (app worked correctly in previous versions)
- Create fresh new project (can be only andorid, no need for ios, desktop or html)
- edit AndoridLauncher.java, add folowing comfig:
config.useImmersiveMode = true;
to enable “full screen mode” - Set app to be portrait rather than landscape (In AndoridManifest.xml, set:
android:screenOrientation="portrait"
) - Build & Deploy
- Start app -> App runs fine -> App runs fine only on first start
- Exit app by pressing back button twice
- Start app again
- There is black belt at the bottom of the screen as shown in screenshot)
Aditional info:
- belt can be removed by going out of the app and back into (middle button)
- belt can be removed by going to app switcher and back into the app
- our app is still in the development, therefore I cannot give you link to the play store to test it, but we have observed same problem with https://play.google.com/store/apps/details?id=com.freaxator.game100balls which presumably uses libgdx framework.
- I have used latest gdx-setup.jar and latest LibGDX 1.7.0
Logs
This is log of first startup (no black belt)
10-22 09:04:45.451 17959-17959/? I/art: Late-enabling -Xcheck:jni 10-22 09:04:45.484 17959-17965/? I/art: Debugger is no longer active 10-22 09:04:45.533 17959-17959/? I/Adreno-EGL: <qeglDrvAPI_eglInitialize:379>: QUALCOMM Build: 09/02/15, 76f806e, Ibddc658e36 10-22 09:04:45.665 17959-17959/? I/AndroidInput: sensor listener setup 10-22 09:04:45.673 17959-17982/? D/OpenGLRenderer: Use EGL_SWAP_BEHAVIOR_PRESERVED: true 10-22 09:04:45.715 17959-17982/? I/Adreno-EGL: <qeglDrvAPI_eglInitialize:379>: QUALCOMM Build: 09/02/15, 76f806e, Ibddc658e36 10-22 09:04:45.715 17959-17982/? I/OpenGLRenderer: Initialized EGL, version 1.4 10-22 09:04:45.746 17959-17978/? W/GL2JNIView: creating OpenGL ES 2.0 context 10-22 09:04:45.761 17959-17978/? I/GL2: all initialized 2 10-22 09:04:45.761 17959-17978/? I/AndroidGraphics: OGL renderer: Adreno ™ 330 10-22 09:04:45.761 17959-17978/? I/AndroidGraphics: OGL vendor: Qualcomm 10-22 09:04:45.762 17959-17978/? I/AndroidGraphics: OGL version: OpenGL ES 3.0 V@127.0 AU@ (GIT@Ibddc658e36) 10-22 09:04:45.762 17959-17978/? I/AndroidGraphics: OGL extensions: GL_AMD_compressed_ATC_texture GL_AMD_performance_monitor GL_AMD_program_binary_Z400 GL_EXT_debug_label GL_EXT_debug_marker GL_EXT_discard_framebuffer GL_EXT_robustness GL_EXT_texture_format_BGRA8888 GL_EXT_texture_type_2_10_10_10_REV GL_NV_fence GL_OES_compressed_ETC1_RGB8_texture GL_OES_depth_texture GL_OES_depth24 GL_OES_EGL_image GL_OES_EGL_sync GL_OES_EGL_image_external GL_OES_element_index_uint GL_OES_fbo_render_mipmap GL_OES_fragment_precision_high GL_OES_get_program_binary GL_OES_packed_depth_stencil GL_OES_depth_texture_cube_map GL_OES_rgb8_rgba8 GL_OES_standard_derivatives GL_OES_texture_3D GL_OES_texture_float GL_OES_texture_half_float GL_OES_texture_half_float_linear GL_OES_texture_npot GL_OES_vertex_half_float GL_OES_vertex_type_10_10_10_2 GL_OES_vertex_array_object GL_QCOM_alpha_test GL_QCOM_binning_control GL_QCOM_driver_control GL_QCOM_perfmon_global_mode GL_QCOM_extended_get GL_QCOM_extended_get2 GL_QCOM_tiled_rendering GL_QCOM_writeonly_rendering GL_EXT_sRGB GL_EXT_sRGB_write_control GL_EXT_texture_sRGB_decode GL_EXT_texture_filter_anisotropic GL_EXT_multisampled_render_to_texture GL_EXT_color_buffer_float > GL_EXT_color_buffer_half_float GL_EXT_disjoint_timer_query 10-22 09:04:45.763 17959-17978/? W/Adreno-EGL: <qeglDrvAPI_eglGetConfigAttrib:607>: EGL_BAD_ATTRIBUTE 10-22 09:04:45.763 17959-17978/? W/Adreno-EGL: <qeglDrvAPI_eglGetConfigAttrib:607>: EGL_BAD_ATTRIBUTE 10-22 09:04:45.763 17959-17978/? I/AndroidGraphics: framebuffer: (5, 6, 5, 0) 10-22 09:04:45.763 17959-17978/? I/AndroidGraphics: depthbuffer: (16) 10-22 09:04:45.763 17959-17978/? I/AndroidGraphics: stencilbuffer: (0) 10-22 09:04:45.763 17959-17978/? I/AndroidGraphics: samples: (0) 10-22 09:04:45.763 17959-17978/? I/AndroidGraphics: coverage sampling: (false) 10-22 09:04:45.767 17959-17978/? I/AndroidGraphics: Managed meshes/app: { } 10-22 09:04:45.767 17959-17978/? I/AndroidGraphics: Managed textures/app: { } 10-22 09:04:45.767 17959-17978/? I/AndroidGraphics: Managed cubemap/app: { } 10-22 09:04:45.767 17959-17978/? I/AndroidGraphics: Managed shaders/app: { } 10-22 09:04:45.767 17959-17978/? I/AndroidGraphics: Managed buffers/app: { }
This is log of second startup (bug, black belt)
10-22 09:02:41.778 15895-15895/? I/art: Late-enabling -Xcheck:jni 10-22 09:02:41.866 15895-15895/com.mygdx.game.android I/Adreno-EGL: <qeglDrvAPI_eglInitialize:379>: QUALCOMM Build: 09/02/15, 76f806e, Ibddc658e36 10-22 09:02:42.004 15895-15895/com.mygdx.game.android I/AndroidInput: sensor listener setup 10-22 09:02:42.010 15895-15936/com.mygdx.game.android D/OpenGLRenderer: Use EGL_SWAP_BEHAVIOR_PRESERVED: true 10-22 09:02:42.052 15895-15936/com.mygdx.game.android I/Adreno-EGL: <qeglDrvAPI_eglInitialize:379>: QUALCOMM Build: 09/02/15, 76f806e, Ibddc658e36 10-22 09:02:42.052 15895-15936/com.mygdx.game.android I/OpenGLRenderer: Initialized EGL, version 1.4 10-22 09:02:42.072 15895-15930/com.mygdx.game.android W/GL2JNIView: creating OpenGL ES 2.0 context 10-22 09:02:42.085 15895-15930/com.mygdx.game.android I/GL2: all initialized 2 10-22 09:02:42.086 15895-15930/com.mygdx.game.android I/AndroidGraphics: OGL renderer: Adreno ™ 330 10-22 09:02:42.086 15895-15930/com.mygdx.game.android I/AndroidGraphics: OGL vendor: Qualcomm 10-22 09:02:42.086 15895-15930/com.mygdx.game.android I/AndroidGraphics: OGL version: OpenGL ES 3.0 V@127.0 AU@ (GIT@Ibddc658e36) 10-22 09:02:42.086 15895-15930/com.mygdx.game.android I/AndroidGraphics: OGL extensions: GL_AMD_compressed_ATC_texture GL_AMD_performance_monitor GL_AMD_program_binary_Z400 GL_EXT_debug_label GL_EXT_debug_marker GL_EXT_discard_framebuffer GL_EXT_robustness GL_EXT_texture_format_BGRA8888 GL_EXT_texture_type_2_10_10_10_REV GL_NV_fence GL_OES_compressed_ETC1_RGB8_texture GL_OES_depth_texture GL_OES_depth24 GL_OES_EGL_image GL_OES_EGL_sync GL_OES_EGL_image_external GL_OES_element_index_uint GL_OES_fbo_render_mipmap GL_OES_fragment_precision_high GL_OES_get_program_binary GL_OES_packed_depth_stencil GL_OES_depth_texture_cube_map GL_OES_rgb8_rgba8 GL_OES_standard_derivatives GL_OES_texture_3D GL_OES_texture_float GL_OES_texture_half_float GL_OES_texture_half_float_linear GL_OES_texture_npot GL_OES_vertex_half_float GL_OES_vertex_type_10_10_10_2 GL_OES_vertex_array_object GL_QCOM_alpha_test GL_QCOM_binning_control GL_QCOM_driver_control GL_QCOM_perfmon_global_mode GL_QCOM_extended_get GL_QCOM_extended_get2 GL_QCOM_tiled_rendering GL_QCOM_writeonly_rendering GL_EXT_sRGB GL_EXT_sRGB_write_control GL_EXT_texture_sRGB_decode GL_EXT_texture_filter_anisotropic GL_EXT_multisampled_render_to_texture GL_EXT_color_buffer_float > GL_EXT_color_buffer_half_float GL_EXT_disjoint_timer_query 10-22 09:02:42.086 15895-15930/com.mygdx.game.android W/Adreno-EGL: <qeglDrvAPI_eglGetConfigAttrib:607>: EGL_BAD_ATTRIBUTE 10-22 09:02:42.086 15895-15930/com.mygdx.game.android W/Adreno-EGL: <qeglDrvAPI_eglGetConfigAttrib:607>: EGL_BAD_ATTRIBUTE 10-22 09:02:42.086 15895-15930/com.mygdx.game.android I/AndroidGraphics: framebuffer: (5, 6, 5, 0) 10-22 09:02:42.087 15895-15930/com.mygdx.game.android I/AndroidGraphics: depthbuffer: (16) 10-22 09:02:42.087 15895-15930/com.mygdx.game.android I/AndroidGraphics: stencilbuffer: (0) 10-22 09:02:42.087 15895-15930/com.mygdx.game.android I/AndroidGraphics: samples: (0) 10-22 09:02:42.087 15895-15930/com.mygdx.game.android I/AndroidGraphics: coverage sampling: (false) 10-22 09:02:42.090 15895-15930/com.mygdx.game.android I/AndroidGraphics: Managed meshes/app: { } 10-22 09:02:42.090 15895-15930/com.mygdx.game.android I/AndroidGraphics: Managed textures/app: { } 10-22 09:02:42.090 15895-15930/com.mygdx.game.android I/AndroidGraphics: Managed cubemap/app: { } 10-22 09:02:42.091 15895-15930/com.mygdx.game.android I/AndroidGraphics: Managed shaders/app: { } 10-22 09:02:42.091 15895-15930/com.mygdx.game.android I/AndroidGraphics: Managed buffers/app: { }
Issue Analytics
- State:
- Created 8 years ago
- Comments:16 (6 by maintainers)
Top GitHub Comments
I have the same issue, I fix this issue by setting immersive mode few seconds latter (Handler.postdelayed) in onResume call.
FYI: I fixed this issue in Unity by explicitly applying Material theme.