Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Material Design Theme Error

I've recently decided to start using "material design" in my application. Getting this error during compile:

Error:(12, 22) No resource found that matches the given name: attr 'windowNoTitle'.

Below it's pointing to this styles.xml

<resources>
<!--
      Base application theme, dependent on API level. This theme is replaced
      by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
  -->
<style name="MyMaterialTheme" parent="MyMaterialTheme.Base">

</style>

<style name="MyMaterialTheme.Base" parent="Theme.AppCompat">
    <item name="windowNoTitle">true</item>
    <item name="windowActionBar">false</item>
    <item name="colorPrimary">@color/colorPrimary</item>
    <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
    <item name="colorAccent">@color/colorAccent</item>
</style>

like image 273
neo Avatar asked Dec 01 '22 17:12

neo


1 Answers

Change <item name="windowNoTitle">true</item> to <item name="android:windowNoTitle">true</item>.

Only some attributes, mostly related to the appcompat-v7 library, need the android:-less version. For all the others, you should always use the android prefix.

like image 51
natario Avatar answered Dec 04 '22 13:12

natario