右滑返回
compile 'com.github.liuguangqiang.swipeback:library:1.0.2@aar'
#写一个类继承于这个SwipeBack
SlideBackActivity
public class SlideBackActivity extends SwipeBackActivity {
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
overridePendingTransition(R.anim.in_from_right, R.anim.out_to_left);
}
@Override
public void finish() {
super.finish();
overridePendingTransition(R.anim.in_from_right, R.anim.out_to_left);
}
}
acrivity的转场动画从右边进入右边出去
in_from_right
android:duration="500" />
out_to_left
android:duration="500" />
设置style
true
@android:color/transparent