how to set toolbar on FragmentActivity?

后端 未结 4 1634
日久生厌
日久生厌 2021-02-19 06:52

I want to set toolbar on my activity which extends FragmentActivity. I know that for use setSuppoertActionBar(toolbar) method we e

4条回答
  •  隐瞒了意图╮
    2021-02-19 07:43

    First set style as  
    
    then
    
    Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
            setSupportActionBar(toolbar);
    ActionBar actionBar = getSupportActionBar();
            actionBar.setTitle("Home");
    

提交回复
热议问题