Android/Full Screen
Retired DISLab
import android.app.Activity; import android.os.Bundle; import android.view.Window; import android.view.WindowManager; public class FullScreenActivity extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle icicle) { super.onCreate(icicle); this.requestWindowFeature(Window.FEATURE_NO_TITLE); this.getWindow() .setFlags(WindowManager.LayoutParams.FLAG_NO_STATUS_BAR, WindowManager.LayoutParams.FLAG_NO_STATUS_BAR); setContentView(R.layout.main); } }
thanks to ace’s comment. the code should be changed to
this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN );