Do not request Window.FEATURE_ACTION_BAR and set windowActionBar to false in your theme to use a Toolbar instead

在某个activity中使用toolbar的使用,必须是在相应的application主题中也设置

   <item name="windowNoTitle">true</item>
<item name="windowActionBar">true</item>

如下:

<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<item name="windowNoTitle">true</item>
<item name="windowActionBar">true</item>

</style>
<style name="AppTheme.NoActionBar">
<!--此处禁止ActionBar的时候,必须在application的Theme中也加上对应的属性-->
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>

</style> </resources>
 

参考:http://*.com/questions/30669926/do-not-request-window-feature-action-bar-and-set-windowactionbar-to-false-in-you

上一篇:兼容IE6及以上的导航栏子菜单栏滑过显示隐藏效果


下一篇:org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.reflection.ReflectionException: There is no getter for property named '__frch_lableId_0' in 'class com.cd.entity.Page'