码迷,mamicode.com
首页 > 其他好文 > 详细

toolbar使用问题

时间:2015-05-29 18:12:36      阅读:119      评论:0      收藏:0      [点我收藏+]

标签:

1.使用页面应当继承与AppCompatActivity


2.如果使用的时候出现如下报错:

java.lang.IllegalStateException: This Activity already has an action bar supplied by the window decor. Do not request Window.FEATURE_ACTION_BAR and set windowActionBar to false in your theme to use a Toolbar instead.

修改style如下:

<resources>

    <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
        <!-- Customize your theme here. -->
    </style>

</resources>


toolbar使用问题

标签:

原文地址:http://blog.csdn.net/s228245214/article/details/46237839

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!