开发者

From where to get Animation sample codes in android [closed]

It's 开发者_JAVA百科difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 11 years ago.

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜