From where to get Animation sample codes in android [closed]
I want to get some sample codes on animation where the page will slide.
Thanks Sunil
create a folder anim in res directory and store there slide_top_to_bottom.xml file
In your program pass the view to which animation will be set
you can get sample xml in installation directory of Android eg. C:\Program Files\Android\android-sdk-windows\samples\android-10\ApiDemos\res\anim
The above directory contains lots of sample animation xml file which you can use
Mostly animation is 3 types, sliding effect- transalte, fading effect - alpha, inreaze or decrease size of page- scale
pageTransition(Context context, View view){
Animation mAnim = AnimationUtils.loadAnimation(context, R.anim.slide_top_to_bottom);
mAnim.setRepeatMode(Animation.ABSOLUTE);
view.startAnimation(mAnim);
}
Thanks Deepak
http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/view/Animation2.html
you can used APi demo then you will get all things.
http://www.inter-fuser.com/2009/08/android-animations-3d-flip.html
精彩评论