跳至主要内容

博文

目前显示的是标签为“slide”的博文

android overridePendingTransition Slide

92 down vote If you want the transition work for whole application you can create a  rootacivity  and inherit it in the activity you need. In Root Activity's onCreate call  overridePendingTransition  with desired direction. And  onStart  call  overridePendingTransition  with other direction if activity is resumed. Here I am giving full running code below.Correct me if I am wrong. create this xml file on your anim folder anim_slide_in_left.xml <? xml version = "1.0" encoding = "utf-8" ?> <set xmlns:android = "http://schemas.android.com/apk/res/android" > <translate android:duration = "600" android:fromXDelta = "100%" android:toXDelta = "0%" > </translate> </set> anim_slide_in_right.xml <? xml version = "1.0" encoding = "utf-8" ?> <set xmlns:android = "http://schemas.android.com/apk/res/android" ...