Android: making a fullscreen application

后端 未结 13 1772
北恋
北恋 2020-11-30 00:31

What is the simplest change that I can make to a new Blank Activity, as created by the latest version of Android Studio, to get the app to appear fullscreen?

I want

相关标签:
13条回答
  • 2020-11-30 01:10

    Add these to Activity of your application.

    Android JAVA

    getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
      WindowManager.LayoutParams.FLAG_FULLSCREEN)
    

    ;

    Android Kotlin

    supportActionBar?.hide()
    window.setFlags(
    WindowManager.LayoutParams.FLAG_FULLSCREEN,
    WindowManager.LayoutParams.FLAG_FULLSCREEN
    )
    
    0 讨论(0)
提交回复
热议问题