Why AppCompat does not support the current theme features windowActionBar: false

前端 未结 3 1490
闹比i
闹比i 2021-01-16 22:09

Why AppCompat does not support the current theme features { windowActionBar: false, windowActionBarOverlay: false, android:windowIsFloating: false, windowActionModeOverlay:

相关标签:
3条回答
  • 2021-01-16 22:26

    Try this,

    <!-- Base application theme. -->
    <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
        <!-- Customize your theme here. -->
        <item name="colorPrimary">@color/colorPrimary</item>
        <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
        <item name="colorAccent">@color/colorAccent</item>
    
        <item name="windowActionBar">false</item>
        <item name="windowActionBarOverlay">false</item>
        <item name="windowIsFloating">false</item>
        <item name="windowActionModeOverlay">false</item>
        <item name="windowNoTitle">false</item>
    </style>
    
    0 讨论(0)
  • 2021-01-16 22:26

    You need to check both styles files styles.xml and styles.xml(v21) in case you have it in your code.

    Both styles files must have a parent theme based on the Theme.AppCompat theme, or a child of it.

    <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
        ...
    </style>
    
    0 讨论(0)
  • 2021-01-16 22:36

    go to your styles.xml and change you main theme parent with NoActionBar like this

     <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>
    
    0 讨论(0)
提交回复
热议问题