1public class ActivityName extends Activity {
2 @Override
3 public void onCreate(Bundle savedInstanceState) {
4 super.onCreate(savedInstanceState);
5 // remove title
6 requestWindowFeature(Window.FEATURE_NO_TITLE);
7 getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
8 WindowManager.LayoutParams.FLAG_FULLSCREEN);
9 setContentView(R.layout.main);
10 }
11}
1res -> values -> styles.xml
2<resources>
3 <style name ...>
4 .
5 .
6 .
7 <item name="android:windowFullscreen">true</item>
8 </style>
9</resources>