android-immersive

Displaying a AlertDialog on screen irrespective of Activity Screen

守給你的承諾、 提交于 2019-12-12 04:25:13
问题 I want to show an Dialog Whatever the screen the User is in. Suppose if user opens application and in initial screen if I receive a server message I have to show it in a dialog.Meanwhile there is an option of autologin . So it could move to my next activity.If this is the case that dialog should not be closed.It should show on newly opened activity rather than the previous activity.And other thing is that even though the dialog is shown I should be able to control my buttons on the activity.

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

浪子不回头ぞ 提交于 2019-12-06 08:58:05
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? Answering my own question, you can set

Why navigation bar is appearing in fullscreen apps when clicked on popup menu

梦想与她 提交于 2019-12-06 02:49:16
问题 I have a fullscreen app: MainActivity.java: public class MainActivity extends AppCompatActivity { @TargetApi(Build.VERSION_CODES.KITKAT) private void removeControlBar(){ View decorView = getWindow().getDecorView(); decorView.setSystemUiVisibility(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 | View.SYSTEM_UI_FLAG_FULLSCREEN | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY); } @Override public

Why navigation bar is appearing in fullscreen apps when clicked on popup menu

安稳与你 提交于 2019-12-04 07:38:47
I have a fullscreen app: MainActivity.java: public class MainActivity extends AppCompatActivity { @TargetApi(Build.VERSION_CODES.KITKAT) private void removeControlBar(){ View decorView = getWindow().getDecorView(); decorView.setSystemUiVisibility(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 | View.SYSTEM_UI_FLAG_FULLSCREEN | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY); } @Override public void onResume(){ super.onResume(); removeControlBar(); } @Override protected void onCreate(Bundle

Immersive Mode showing blank space

限于喜欢 提交于 2019-11-30 06:39:04
I'm trying to implement a fullscreen mode, but for Android 4.4 and up, it shows a blank space there: BEFORE immersive mode(fullscreen) and AFTER the toggleFullScreen (false); as you can see, its doesn't remove it . Here's the code that I'm using to toggle it: public void toggleFullscreen(boolean fs) { if (Build.VERSION.SDK_INT >= 11) { // The UI options currently enabled are represented by a bitfield. // getSystemUiVisibility() gives us that bitfield. int uiOptions = this.getWindow().getDecorView().getSystemUiVisibility(); int newUiOptions = uiOptions; boolean isImmersiveModeEnabled = (

Immersive Mode showing blank space

妖精的绣舞 提交于 2019-11-29 05:43:45
问题 I'm trying to implement a fullscreen mode, but for Android 4.4 and up, it shows a blank space there: BEFORE immersive mode(fullscreen) and AFTER the toggleFullScreen (false); as you can see, its doesn't remove it . Here's the code that I'm using to toggle it: public void toggleFullscreen(boolean fs) { if (Build.VERSION.SDK_INT >= 11) { // The UI options currently enabled are represented by a bitfield. // getSystemUiVisibility() gives us that bitfield. int uiOptions = this.getWindow()