how to give top to bottom animation android
<p>i am able to give bottom to top animation when i go to next activity but now when i pressed back i am using same code for giving animation from top to bottom animation but it always goes to bottom to top so my question is how to give animation from top to bottom when i pressed back button on android device..
my code for giving animation is below</p>

<p>use when go from one activity to other using intent..</p>

<pre><code>        overridePendingTransition( R.anim.slide_in_up, R.anim.slide_out_up );
</code></pre>

<p>and xml is:  slide_in_up.xml</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;translate xmlns:android="http://schemas.android.com/apk/res/android"
android:fromYDelta="100%p" android:toYDelta="0%p"
android:duration="@android:integer/config_longAnimTime"/&gt;
</code></pre>

<p>and slide_out_up.xml  is </p>

<pre><code> &lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;translate xmlns:android="http://schemas.android.com/apk/res/android"
android:fromYDelta="0%p" android:toYDelta="-100%p"
android:duration="@android:integer/config_longAnimTime"/&gt;
</code></pre>
