Yup, I got it. The animation was in the wrong resource folder... needed to create "anim" folder under "res"... so obvious! Thanks!
Ok, hopefully this is the last thing.. On May 1, 7:04 pm, Mark Murphy <[EMAIL PROTECTED]> wrote: > kfealz wrote: > > Thanks so much! > > Happy to help! > > > > > I'm trying to get an animation working. I ripped some of the code out > > of Google's shake sample in the API demos, and I want one of the text > > fields to "shake" under a certain condition (when invalid username/ > > password are entered). > > > So, I added: > > > Animation shake = AnimationUtils.loadAnimation(this, > > R.anim.shake); > > findViewById(R.id.password).startAnimation(shake); > > > Eclipse gives me the error: "R.anim cannot be resolved". > > I'm not sure exactly where R.anim are coming from.. I've been looking > > around, but can't find anything that would suggest why it wouldn't be > > resolved. > > I found class information > > here:http://code.google.com/android/reference/android/R.anim.html > > , but it doesn't seem like I should need to import anything additional > > to make it be recognized (aside from android.view.animation.Animation > > and android.view.animation.AnimationUtils, which I am already > > importing). > > Only a guess or two. I haven't played with animations, and I don't use > Eclipse. > > Generally speaking, the R class comes from the resource compilation > step. R.java gets rebuilt by the resource compiler before you compile > (javac) the whole app. So, either the resource compiler hasn't been run > yet since you added your animation (in which case just try compiling and > see if it works), or it has been run and it's not picking up your > animation for some reason (e.g., wrong filename, wrong resource folder, > got eaten by a grue). > > -- > Mark Murphy (a Commons Guy)http://commonsware.com > The Busy Coder's Guide to Android Development -- coming in June 2008! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~----------~----~----~----~------~----~------~--~---

