您的位置:首页 > 其它

使用ActionBar缺少主题时jar包中抛类型转换异常

2016-07-21 10:47 423 查看
使用ActionBar缺少主题时jar包中抛类型转换异常:

07-20 18:11:36.467: E/AndroidRuntime(25775): java.lang.ClassCastException: 

android.widget.LinearLayout$LayoutParams cannot be cast to com.android.internal.widget.ActionBarOverlayLayout$LayoutParams

解决方案为styles中加上主题AppTheme:

<resources>

<style name="AppBaseTheme" parent="@android:style/Theme.DeviceDefault"></style>

    <style name="AppTheme" parent="AppBaseTheme">

        <item name="android:windowActionBar">false</item>

        <item name="android:windowNoTitle">true</item>

    </style>

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