[Android] Mobile defender interface Toggle Animation

Source: Internet
Author: User

creating Files in /res/anim/ tran_out.xml

Add <translate> nodes

Set x axis source coordinates android:fromxdelta="0"

Set x - axis purpose coordinates android:toxdelte=" -100%p" the entire parent form

Set y - axis source coordinates android:fromydelta="0"

Set y axis destination coordinates android:toydelta="0"

Set execution time android:duration="

creating Files in /res/anim/ tran_in.xml

Add <translate> nodes

Set x axis source coordinates android:fromxdelta="100%p" entire parent form

Set x Axis purpose coordinates android:toxdelte="0"

Set y - axis source coordinates android:fromydelta="0"

Set y axis destination coordinates android:toydelta="0"

Set execution Time android:duration= "

In the activity jump page Section

Behind the startactivity () and finish () methods

Call the overridependingtransition () method, Parameter:r.anim.xxx_in,r.anim.yyyyy_out

But in my simulator,activity left to move out of the time is a black screen, looking for a half day did not find the reason, it is strange

Trans_in.xml

<?XML version= "1.0" encoding= "Utf-8"?><Translatexmlns:android= "Http://schemas.android.com/apk/res/android"android:duration= "$"Android:fromxdelta= "100%"Android:fromydelta= "0"Android:toxdelta= "0"Android:toydelta= "0" ></Translate>

Trans_out.xml

 <?  xml version= "1.0" encoding= "Utf-8"  ?>  <  set  xmlns:android  = "Http://schemas.android.com/apk/res/android"     >  <  translate  android:fromxdelta  = "0"   Android:toxdelta  = " -100%"   Android:duration         = " />  </ set  >  

Trans_pre_in.xml

<?XML version= "1.0" encoding= "Utf-8"?><Translatexmlns:android= "Http://schemas.android.com/apk/res/android"android:duration= "$"Android:fromxdelta= " -100%p"Android:fromydelta= "0"Android:toxdelta= "0"Android:toydelta= "0" ></Translate>

Trans_pre_out.xml

<?XML version= "1.0" encoding= "Utf-8"?><Translatexmlns:android= "Http://schemas.android.com/apk/res/android"android:duration= "$"Android:fromxdelta= "0"Android:fromydelta= "0"Android:toxdelta= "100%p"Android:toydelta= "0" ></Translate>

[Android] Mobile defender interface Toggle Animation

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.