android - Animating transition with a slide up -


i'm trying create animation use overridependingtransition() method. can't result want. want first activity slide out of screen , second activity coming in bottom. bottom animation works, can't first activity slide up. use animation:

 <set xmlns:android="http://schemas.android.com/apk/res/android" > <translate     android:duration="600"     android:fillafter="true"     android:fromydelta="100%p"     android:shareinterpolator="false"     android:toydelta="0%p" />  </set> 

but makes slide down bottom of screen, i've tried lot of value combinations can't work.

use

<?xml version="1.0" encoding="utf-8"?> <translate xmlns:android="http://schemas.android.com/apk/res/android"     android:duration="500"     android:fromydelta="0%"     android:interpolator="@android:anim/accelerate_interpolator"     android:toydelta="-100%" /> 

here interpolator : interpolator defines rate of change of animation. allows basic animation effects (alpha, scale, translate, rotate) accelerated, decelerated, repeated, etc.

source


Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -