I am attempting to create a custom version of the Navigation Drawer using fragments. The issue that occurs is that while I am using the Xamarin Support Library v4, Resource.Animation
slide animations throw an error of java.lang.RuntimeException: Unknown animator name: translate
and I am unable to add my own animations because there is no Animation folder. When I try to create one, it gives me an error of Invalid resource directory name: "animation".
How can I add my own animations to my project?
Asked
Active
Viewed 1,438 times
0

GPinskiy
- 307
- 1
- 6
- 20
-
Try to call (in `res/`) the folder `anim` instead of `animation`. – Blo May 22 '14 at 21:24
-
Both `res` and `anim` don't exist. I have a folder called `Resources` and no animation folder under it, just drawables, layouts and whatnot. – GPinskiy May 22 '14 at 21:26
-
1In [the docs](http://docs.xamarin.com/guides/android/application_fundamentals/graphics_and_animation/) in **View Animations** section, it says: "*The animation XML files will be stored in the /Resources/anim directory of a Xamarin.Android project*". – Blo May 22 '14 at 21:30
-
Ugh, thank you. I tried adding `Anim` before but it threw an error. Seems like its case sensitive and only accepts `anim`. – GPinskiy May 22 '14 at 21:37
-
Did this solve also the `Unknown animator name: translate` error? – Blo May 22 '14 at 21:40
-
Unfortunately, no. I'll just have to use `objectAnimator`s instead of a `translate`. – GPinskiy May 22 '14 at 21:42
-
See the link from the docs, and in the same section, you have a simple topic to create a set animation in xml and use it dynamically with `LoadAnimation()`. This is exactly the same with `translate`. Don't understand why you need an `ObjectAnimator` rather than this simplest way. – Blo May 22 '14 at 21:46
-
The reason I have to use an `objectAnimator` is because all `translate ` mentions in my code throw an error when those animations are run. – GPinskiy May 22 '14 at 22:23
-
Then, can you share your files which cause these errors? Someone could help but it might be difficult without what you've done. – Blo May 22 '14 at 22:25
1 Answers
1
This problem is not unique to Xamarin. It is a general issue in the Android framework. You have to be careful about "Animator" versus "Animation." See Nurik's answer here for more info.

Community
- 1
- 1

William Jockusch
- 26,513
- 49
- 182
- 323