I'm still a starter in Android. And i just wanna set the fade_in fade_out animations with my Fragments.
and i read the android document, which shows that the R.animator.fade_in is available.
but in my Android Studio, when i typed in R.animator, it alerts that "cant resolve animator".
are there any native/default animations available in android recource?
If you want to use any resources provided by Android you have to prefix it with "android" to specify from which package to load it like this "android.R.anim.fade_in".
If you want to see all of the resources provided by Android, go to the location where your Android Studio is installed(or just locate the sdk folder if you downloaded a separate sdk folder like for eclipse) open the "sdk" folder, then open the "platform" folder, tgen select any platform versions, go to "res" folder, you can check out all of the built-in resources provided by the platform, it is really great and helpful to you to see how a particular resource is created, for example, you can open the "anim" folder, locate the "fade_out.xml" resource file and see how it is constructed. Hope this helps you a little
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With