Screen transition effects android -
i trying left right swipe transition of button click in screen 1 , right left transition screen 2 screen one. following codes
screen 1:
intent intent = new intent(customactivitytransitionactivity.this, secondactivity.class); overridependingtransition(r.anim.slide_in_right, r.anim.slide_out_left); startactivity(intent);
screen 2:
intent intent = new intent(secondactivity.this, customactivitytransitionactivity.class); overridependingtransition(r.anim.slide_in_left, r.anim.slide_out_right); startactivity(intent);
the respective anims give below,
slide_in_left
<set xmlns:android="http://schemas.android.com/apk/res/android" android:shareinterpolator="false" > <translate android:duration="200" android:fromxdelta="-100%" android:fromydelta="0%" android:toxdelta="0%" android:toydelta="0%" /> </set>
slide_out_left
<set xmlns:android="http://schemas.android.com/apk/res/android" android:shareinterpolator="false" > <translate android:duration="200" android:fromxdelta="0%" android:fromydelta="0%" android:toxdelta="-100%" android:toydelta="0%" /> </set>
slide_in_right
<set xmlns:android="http://schemas.android.com/apk/res/android" android:shareinterpolator="false" > <translate android:duration="200" android:fromxdelta="100%" android:fromydelta="0%" android:toxdelta="0%" android:toydelta="0%" /> </set>
slide_out_right
<set xmlns:android="http://schemas.android.com/apk/res/android" android:shareinterpolator="false" > <translate android:duration="200" android:fromxdelta="0%" android:fromydelta="0%" android:toxdelta="100%" android:toydelta="0%" /> </set>
it giving top transition, if use 1 left right swipe , disable right left, working. please guide going wrong values replace.
Comments
Post a Comment