Android学习总结——去除标题栏

1.继承app.Activity的Activity去除标题栏

@Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        requestWindowFeature(Window.FEATURE_NO_TITLE);//去除标题栏
        setContentView(R.layout.activity_main);
    }

 

2.继承v7.app.AppCompatActivity的Activity去除标题栏

   @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        getSupportActionBar().hide();//去除标题栏
    }

 

posted @ 2017-01-04 16:54  程序员大佬超  阅读(228)  评论(0编辑  收藏  举报