Activity设置fullscreen或no title bar

设置fullscreen
Java代码  
requestWindowFeature(Window.FEATURE_NO_TITLE);  
        getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,  WindowManager.LayoutParams.FLAG_FULLSCREEN);  
设置no title bar
Java代码  
requestWindowFeature(Window.FEATURE_NO_TITLE);  
PS:设置这些必须是在setContentView之前。

你可能感兴趣的:(Activity)