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>

Yet the spelling is fine, anim is a folder off the 'res' folder...
LVL 10
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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="">  
<item android:state_focused="true"
         android:drawable="@drawable/icon_1" />
<item android:state_focused="true"
         android:drawable="@drawable/icon_1_press" />
<item android:state_focused="false"
         android:drawable="@drawable/icon_1_press" />
<item android:drawable="@drawable/icon_1" />

You will have to modify it as per your requirement.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.