为什么overridePendingTransition在android 4.0或更高版本中不起作用?

为什么overridePendingTransition在android 4.0或更高版本中不起作用?,android,Android,这段代码在我的HTC Disire和安卓2.3.3设备上运行良好,但在我的安卓4.0手机——华为C8812上不运行 public void changeNextActivity(Class<?> c){ Intent intent = new Intent(this,c); this.startActivity(intent); overridePendingTransition(R.anim.animation_right_in,R.anim.animati

这段代码在我的HTC Disire和安卓2.3.3设备上运行良好,但在我的安卓4.0手机——华为C8812上不运行

public void changeNextActivity(Class<?> c){
    Intent intent = new Intent(this,c);
    this.startActivity(intent);
    overridePendingTransition(R.anim.animation_right_in,R.anim.animation_left_out);
}
public void changenextractivity(c类){
意向=新意向(本,c);
这一点。触觉(意图);
重写转换(R.anim.animation\u right\u in,R.anim.animation\u left\u out);
}

尝试在新活动的onCreate中写入重写结束转换代码

 public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        overridePendingTransition(R.anim.slide_in_hor, R.anim.slide_out_hor);
        setContentView(R.layout.main);

        }