What is the Default ActionBar Title Font Size?

后端 未结 2 604
情话喂你
情话喂你 2020-12-04 20:29

Seems to be 17dip. Just want to confirm it if anyone knows the exact size.

2条回答
  •  醉酒成梦
    2020-12-04 21:32

    This works for me.

    This is what I do to get the default toolbar style:

    
    
    
        
    
    
    

    This does the trick to keep the default style style="@style/TextAppearance.AppCompat.Widget.ActionBar.Title"

    Then in your activity, you can do:

    Toolbar toolbarTop = (Toolbar) findViewById(R.id.toolbar_top);
    TextView mTitle = (TextView) toolbarTop.findViewById(R.id.toolbar_title);
    mTitle.setText("Custom...");
    

提交回复
热议问题