How to hide navigation bar permanently in android activity?

Snippets: FullScreenFragment.java HideNavigationBarComponent.java This is for Android 4.4+ Try out immersive mode https://developer.android.com/training/system-ui/immersive.html Fast snippet (for an Activity class): private int currentApiVersion; @Override @SuppressLint(“NewApi”) protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); currentApiVersion = android.os.Build.VERSION.SDK_INT; final int flags = 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; // This work only for android 4.4+ … Read more

How to handle events from keyboard and mouse in full screen exclusive mode in java?

It looks like the usual approaches shown in How to Use Key Bindings and How to Write a Mouse Listener work correctly in Full-Screen Exclusive Mode. import java.awt.Color; import java.awt.EventQueue; import java.awt.GraphicsDevice; import java.awt.GraphicsEnvironment; import java.awt.event.ActionEvent; import java.awt.event.KeyEvent; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; import java.awt.event.WindowEvent; import javax.swing.AbstractAction; import javax.swing.Action; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JPanel; import … Read more

How to make the window full screen with Javascript (stretching all over the screen)

In newer browsers such as Chrome 15, Firefox 10, Safari 5.1, IE 10 this is possible. It’s also possible for older IE’s via ActiveX depending on their browser settings. Here’s how to do it: function requestFullScreen(element) { // Supports most browsers and their versions. var requestMethod = element.requestFullScreen || element.webkitRequestFullScreen || element.mozRequestFullScreen || element.msRequestFullScreen; if … Read more