java代码
Toolbar toolbar = findViewById(R.id.tp_tb); toolbar.setTitle(R.string.tracing_title); setSupportActionBar(toolbar);
styles.xml设置:
<!-- Base application theme. --> <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar"> <!-- Customize your theme here. --> <item name="colorPrimary">@color/colorPrimary</item> <item name="colorPrimaryDark">@color/colorPrimaryDark</item> <item name="colorAccent">@color/colorAccent</item> </style>
但是我的toolbar就是没有显示,是不是因为我设置的mapView组件遮挡了?
相关分类