and.hl wrote:
> Its a compile time error... and am getting the below error
>
> " The method loadAnimation(Context, int) in the type AnimationUtils is
> not applicable for the arguments (new View.OnKeyListener(){}, int) "
This is a Java thing, not an Android thing.
The object associated with the keyword "this" varies by context. At the
point when you're calling AnimationUtils.loadAnimation(), "this" is NOT
the activity. Instead, it is the instance of ListView.OnKeyListener,
whose onKey() method you are overriding.
To get the proper "this" for AnimationUtils.loadAnimation(), you need to
prefix it with the class name of the activity in which you're operating:
AnimationUtils.loadAnimation(MyGreatActivity.this, ...)
--
Mark Murphy (a Commons Guy)
http://commonsware.com
Android Training on the Ranch in September! http://www.bignerdranch.com
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" 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-developers?hl=en
-~----------~----~----~----~------~----~------~--~---