方法一 overridePendingTransition(0,0)

 void android.app.Activity.overridePendingTransition(int enterAnim, int exitAnim)Call immediately after one of the flavors of startActivity(Intent) or finish to specify an explicit transition animation to perform next.Parameters:enterAnim A resource ID of the animation resource to use for the incoming activity. Use 0 for no animation.exitAnim A resource ID of the animation resource to use for the outgoing activity. Use 0 for no animation.
在Activity中提供了overridePendingTransition函数, 用在startActivity(Intent) 和 finish之后 。overridePendingTransition有两个参数,都是int类型的,意味着这里要传入一个资源。一个是进入的动画,一个是退出的动画,如果连个值都设置成0,则表示不添加动画。

animationdrable资源举例:

<?xml version="1.0" encoding="utf-8"?>        

或考虑直接使用安卓自带的动画资源android.R.anim.*

方法二 android:theme

        
parent="@android:style/Animation.Activity"不可少,
  true可选。

android:theme的使用

                


更多相关文章

  1. android 自定义组件随着手指自动画圆
  2. android中opengl es基本方法使用说明
  3. android 沉浸式状态栏的三种方法
  4. Android平移动画
  5. 16 个Android 开发者必备工具资源
  6. android资源合集
  7. JS判断终端类型的几种方法

随机推荐

  1. Android性能测试之内存泄露以及GC机制浅
  2. cocos2dx 在mac下开发ios和android游戏
  3. Android(安卓)Studio打包apk
  4. android PowerManager wakelock
  5. android 混淆文件proguard.cfg详解
  6. 个人收集的Android开发相关网站集
  7. Android开发中调用系统设置界面
  8. Android(安卓)资料整理
  9. Android(安卓)之 SharedPreferences
  10. Data Binding的报错集合: 例如Error:(10,