天道酬勤,学无止境

android-immersive

How do I enable full screen immersive mode for a Native Activity NDK app?

Reading the documentation at https://developer.android.com/training/system-ui/immersive.html I can't seem to find any information on how to set full screen immersive mode in a Native Activity NDK app (without using JNI) as it seems full screen immersive mode can only be toggled from Java. As it cannot be set from the manifest (Set Android immersive full screen mode in manifest), is there any way to request it via EGL? Seems the only way to enable full screen immersive mode is to call setSystemUiVisibility via JNI ahead of requesting a surface via EGL?

2021-06-11 12:46:54    分类:问答    android   android-ndk   java-native-interface   native-activity   android-immersive

显示DialogFragment时保持沉浸模式(Maintain Immersive mode when DialogFragment is Shown)

问题 我有一个使用片段制作的Android应用程序 我使用以下代码隐藏了屏幕顶部和底部的条形图。 @Override protected void onResume() { super.onResume(); isInBackground = false; if(null == getFragmentManager().findFragmentById(R.id.content_container)) { getFragmentManager().beginTransaction().add(R.id.content_container,new PresenterFragment(), PresenterFragment.FRAG_TAG).commit(); } if(Build.VERSION.SDK_INT >=19) { View decorView = getWindow().getDecorView(); int uiOptions = View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION // hide nav

2021-05-08 14:57:55    分类:技术分享    android   keyboard   android-dialogfragment   android-immersive

Maintain Immersive mode when DialogFragment is Shown

I have an Android Application that is made using Fragments I am hiding the bars at top and bottom of my screen, using the following code. @Override protected void onResume() { super.onResume(); isInBackground = false; if(null == getFragmentManager().findFragmentById(R.id.content_container)) { getFragmentManager().beginTransaction().add(R.id.content_container,new PresenterFragment(), PresenterFragment.FRAG_TAG).commit(); } if(Build.VERSION.SDK_INT >=19) { View decorView = getWindow().getDecorView(); int uiOptions = View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION |

2021-04-14 20:53:52    分类:问答    android   keyboard   android-dialogfragment   android-immersive