美文网首页
this.requestWindowFeature(Window

this.requestWindowFeature(Window

作者: A一土彳曰于丶金金金 | 来源:发表于2018-04-15 23:41 被阅读0次
    • 方法一

    this.requestWindowFeature(Window.FEATURE_NO_TITLE);需写在setContentView(R.layout.main);的上面


    • 方法二

    如果该Activity继承AppCompatActivity,则使用以下两种方法

    1. AppCompatActivity继承为Activity

    2. 在onCreate()方法中加入如下代码:

    if(getSupportActionBar() != null){
            getSupportActionBar().hide();
            }
    这个方法经过我的测试报错,你们自己测试
    

    相关文章

      网友评论

          本文标题:this.requestWindowFeature(Window

          本文链接:https://www.haomeiwen.com/subject/wqzjkftx.html