We help IT Professionals succeed at work.

android - syntax error: The word @anim is not spelled incorrectly

I have this code:
<style name="Animations" parent="@android:Animation" >
    <style name="Animations.SplashScreen">
        <item name="android:windowEnterAnimation">@anim/appear</item>
        <item name="android:windowExitAnimation">@anim/disappear</item>
    </style>
</style>


Yet the spelling is fine, anim is a folder off the 'res' folder...
Comment
Watch Question

Commented:
Logically what you have written is correct. But, to my understanding, for your purpose, I think you will have to some thing like,

<?xml version="1.0" encoding="utf-8"?>
<selector   xmlns:android="http://schemas.android.com/apk/res/android">  
<item android:state_focused="true"
         android:state_pressed="false"
         android:drawable="@drawable/icon_1" />
<item android:state_focused="true"
         android:state_pressed="true"
         android:drawable="@drawable/icon_1_press" />
<item android:state_focused="false"
         android:state_pressed="true"
         android:drawable="@drawable/icon_1_press" />
<item android:drawable="@drawable/icon_1" />
</selector>

You will have to modify it as per your requirement.