Open top menu


Your application show is best used some XML Animation. In this tutorial explain how to add xml animation in our application in android. 
*first we are create  res/anim folder ,you create a multiple xml animations piece code. 

slied_in_right.xml

<set xmlns:android="http://schemas.android.com/apk/res/android"
    android:interpolator="@android:anim/accelerate_interpolator">
    <translate
        android:fromXDelta="100%p"
        android:toXDelta="0"
        android:duration="@android:integer/config_shortAnimTime" />
</set>


sliedOut_to_right.xml

<set xmlns:android="http://schemas.android.com/apk/res/android"
    android:interpolator="@android:anim/accelerate_interpolator">
    <translate
        android:fromXDelta="0"
        android:toXDelta="100%p"
        android:duration="@android:integer/config_shortAnimTime" />
</set>


 these xml animation code used in Activity Open and Close,how to used shows here.


           Intent i=new Intent(MenueActivity.this,Term_And_Condition.class);
  startActivity(i);          
   overridePendingTransition(R.anim.slied_in_right,R.anim.sliedOut_to_right);

0 comments