您的位置:首页 > 产品设计 > UI/UE

Do not request Window.FEATURE_SUPPORT_ACTION_BAR

2016-04-22 00:00 686 查看
摘要: This Activity already has an action bar supplied by the window decor. Do not request Window.FEATURE_SUPPORT_ACTION_BAR and set windowActionBar to false in your theme to use a Toolbar instead.

java.lang.RuntimeException: Unable to start activity ComponentInfo{chrisrenke.drawerarrowdrawable/chrisrenke.drawerarrowdrawable.DrawerArrowSample}: java.lang.IllegalStateException: This Activity already has an action bar supplied by the window decor. Do not request Window.FEATURE_SUPPORT_ACTION_BAR and set windowActionBar to false in your theme to use a Toolbar instead.



<item name="windowActionBar">false</item>
代替

<item name="android:windowActionBar">false</item>
<style name="AppTheme" parent="AppTheme.Base" />
<style name="AppTheme.Base" parent="Theme.AppCompat.Light.NoActionBar">
<item name="colorPrimary">@color/primary</item>
<item name="colorPrimaryDark">@color/primaryDarker</item>
<item name="android:windowNoTitle">true</item>
<item name="windowActionBar">false</item>
<item name="drawerArrowStyle">@style/DrawerArrowStyle</item></style><style name="DrawerArrowStyle" parent="Widget.AppCompat.DrawerArrowToggle">
<item name="spinBars">true</item>
<item name="color">@android:color/white</item>
</style>

<color name="primary">#457C50</color>
<color name="primaryDarker">#580C0C</color>

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: