Could anyone help me how to use RotateDrawable in Xamarin? I am working on a Xamarin.Forms project and I need to rotate a drawable in the MainActivity.cs and then set the rotated drawable as a background, I've wrote this but I got an exception:
RotateDrawable rotateDrawable = (RotateDrawable)Resource.Drawable.ts_logo; <<<< got exception here
Android.Animation.ObjectAnimator.OfInt(rotateDrawable, "level", 0, 10000).Start();
Window.DecorView.SetBackground(rotateDrawable);
The exception message is "System.InvalidCastException: Specified cast is not valid
"