1、在布局文件中引用"?actionBarSize"
例如:
<android.support.v7.widget.Toolbar
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
/>
2、Ctrl+单击actionBarSize
,进入系统的values目录
我的点击后跳转到actionBarSize属性的声明位置,看不到具体值,如下:
<declare-styleable name="AppCompatTheme">
<attr name="windowActionBar" format="boolean" />
<attr name="windowNoTitle" format="boolean" />
...
<attr name="actionBarSize" format="dimension">
<enum name="wrap_content" value="0" />
</attr>
...
</declare-styleable>