Android set up full screen code sharing

  • 2020-06-07 05:17:11
  • OfStack

Very simple 1 piece of code to set up android's full screen

public class MainActivity extends Activity {
     public void onCreate(Bundle savedInstanceState) {
         // Hide the title bar (the name of the application)
         // Hide the status bar section (battery ICONS and so on) 1 Starting part)
          this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULL_SCREEN, WindowManager.LayoutParams.FLAG_FULL_SCREEN);
         setContentView(new MyView(this));

Related articles: