I have an animation defined in an XML resource and I want to attach this animation to a view. I know how to do this in code manually, but I was wondering if it is possible to attach this animation to the view directly in the layout declaration. Sort of:
<ImageView android:animation="@anim/my_anim" />
Thus, the animation will automatically start without any external code call. Is this possible with the built-in Android SDK (I'm not looking for any external library that can add this as a transition function)? If so, how?
source
share