Android switch interface slides in from top, slide right into

Source: Internet
Author: User

The Android switching interface slides in from the top:


we have used the Overridependingtransition method, the first parameter refers to a set to start

The way the activity enters, the second parameter specifies how the current activity exits

Overridependingtransition (R.anim.ani_top_get_into, r.anim.ani_bottom_sign_out);


R.anim.ani_top_get_into file:

<translate xmlns:android= "Http://schemas.android.com/apk/res/android"

android:duration= "500"

Android:fromxdelta= "0"

Android:fromydelta= "-100%"

Android:toxdelta= "0"

Android:toydelta= "0" >

</translate>


R.anim.ani_bottom_sign_out file:

<translate xmlns:android= "Http://schemas.android.com/apk/res/android"

android:duration= "500"

Android:fromxdelta= "0"

Android:fromydelta= "0"

Android:toxdelta= "0"

Android:toydelta= "100%" >

</translate>


It is to let the jump interface from top to bottom into the original interface slipped from the bottom, so that will get the interface

Animation effect that slides in from the top


The interface slides in from the right:

Overridependingtransition (R.anim.ani_right_get_into, r.anim.ani_left_sign_out);


R.anim.ani_right_get_into file:

<translate xmlns:android= "Http://schemas.android.com/apk/res/android"

android:duration= "500"

Android:fromxdelta= "100%"

Android:fromydelta= "0"

Android:toxdelta= "0"

Android:toydelta= "0" >

</translate>


R.anim.ani_left_sign_out file:

<translate xmlns:android= "Http://schemas.android.com/apk/res/android"

android:duration= "500"

Android:fromxdelta= "0"

Android:fromydelta= "0"

Android:toxdelta= "-100%"

Android:toydelta= "0" >

</translate>






Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Android switch interface slides in from top, slide right into

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.