方法一 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. 浅谈Java中Collections.sort对List排序的两种方法
  2. Python list sort方法的具体使用
  3. python list.sort()根据多个关键字排序的方法实现
  4. Android(安卓)DOC文档分析——Dialog
  5. android中opengl es基本方法使用说明
  6. android 自定义组件随着手指自动画圆
  7. android 沉浸式状态栏的三种方法
  8. Android菜单实现两种方式
  9. Android(安卓)系统中GPS Location Service 的实现与架构

随机推荐

  1. Android Camera子系统代码流程1
  2. Android实现图片放大缩小
  3. cocos2dx在xcode下开发,编译到android上
  4. Android面试之---谈谈你对Android(安卓)N
  5. android 两点缩放图片
  6. Android 5.0 Input初始化
  7. Android 全屏
  8. Android Build 异常 -android.support.VE
  9. Android百度地图基础实现(标记+GPS)
  10. 用maven创建android的项目。