码迷,mamicode.com
首页 > 其他好文 > 详细

界面左进右出,右进左出特效

时间:2018-07-25 13:14:31      阅读:845      评论:0      收藏:0      [点我收藏+]

标签:nis   protected   etc   err   bundle   you   guide   android   span   

技术分享图片

 


left_in
<?xml version="1.0" encoding="utf-8"?> <translate xmlns:android="http://schemas.android.com/apk/res/android" android:fromXDelta="-100%" android:toXDelta="0" android:duration="500"> </translate> left_out <?xml version="1.0" encoding="utf-8"?> <translate xmlns:android="http://schemas.android.com/apk/res/android" android:fromXDelta="0" android:toXDelta="-100%" android:duration="500"> </translate> right_in <?xml version="1.0" encoding="utf-8"?> <translate xmlns:android="http://schemas.android.com/apk/res/android" android:fromXDelta="100%" android:toXDelta="0" android:duration="500"> </translate> right_out <?xml version="1.0" encoding="utf-8"?> <translate xmlns:android="http://schemas.android.com/apk/res/android" android:fromXDelta="0" android:toXDelta="100%" android:duration="500"> </translate>
public class SetupGuide2Activity extends Activity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_setup_guide2);
    }
    
    public void next(View v) {
        startActivity(new Intent(this, SetupGuide3Activity.class));
        overridePendingTransition(R.anim.right_in, R.anim.left_out);
    }
    
    public void pre(View v) {
        finish();
        overridePendingTransition(R.anim.left_in, R.anim.right_out);
    }
}

 

界面左进右出,右进左出特效

标签:nis   protected   etc   err   bundle   you   guide   android   span   

原文地址:https://www.cnblogs.com/znsongshu/p/9365363.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!