Reputation: 1461
imageSwitcher.setInAnimation(AnimationUtils.loadAnimation(this,
android.R.anim.fade_in));
In the above line when I am using R.anim. fade_in/fade_out/slide_in_left/slide_in_right my app is working correctly. But if I am using any other animation, then in my phone it displays an error stopped unexpectedly. When I checked the error in the LogCat, it displayed an Runtime exception: Unknown animation name: cycleInterpolator (for example). Why is this happening
Upvotes: 0
Views: 672
Reputation:
you can find the animations tutorial in this book: Android User Interface Development by Jason Morris
Upvotes: 1
Reputation: 1461
The above mentioned four animations are built in for android. So, we dont need to write any special code for them. In the other case, they are not built in. So, you create a new folder in the res and name in anim. In the res/anim folder create a new xml file and write the animations for it using the tags
translate, scale, rotate, alpha, set
Upvotes: 1