Android - 如何获得 android.R.anim.slide_in_right

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/1274657/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-20 02:53:16  来源:igfitidea点击:

Android - how to get android.R.anim.slide_in_right

androidanimation

提问by CommonsWare

I'm playing about with animations with android. The animations android.R.anim.slide_in_left and android.R.anim.slide_out_right are provided. I'm looking for a way to get the opposite animations i.e:

我正在用 android 玩动画。提供了动画 android.R.anim.slide_in_left 和 android.R.anim.slide_out_right。我正在寻找一种方法来获得相反的动画,即:

android.R.anim.slide_in_right and android.R.anim.slide_out_left

android.R.anim.slide_in_right and android.R.anim.slide_out_left

or how I can specify these myself.

或者我如何自己指定这些。

回答by CommonsWare

Here are slide_in_rightand slide_out_leftfrom the Android open source project.

下面是slide_in_rightslide_out_left从Android的开源项目。

回答by Ashish Anand

android:inAnimation="@android:anim/slide_in_left"
android:outAnimation="@android:anim/slide_out_right"

回答by emidander

Both slide_in_rightand slide_out_leftexist in Android 2.1 and above.

slide_in_rightslide_out_left存在于Android 2.1及以上。