Android(以编程方式删除标题/通知栏)

【Android(以编程方式删除标题/通知栏)】犀渠玉剑良家子,白马金羁侠少年。这篇文章主要讲述Android:以编程方式删除标题/通知栏相关的知识,希望能为你提供帮助。
There are roughly three ways to do this: programatically, through stylesheets, or through the Anroid manifest.

  1. public class MainActivity extends Activity {
  2. /** Called when the activity is first created. */
  3. @Override
  4. public void onCreate( Bundle savedInstanceState) {
  5. super.onCreate( savedInstanceState) ;
  6. setContentView( R.layout.main) ;
  7.  
  8. //Remove title bar
  9. this.requestWindowFeature( Window.FEATURE_NO_TITLE) ;
  10.  
  11. //Remove notification bar
  12. this.getWindow( ) .setFlags( WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN) ;
  13.  
  14. }
  15. }


    推荐阅读