animation - Slide anim android -


i have homescreen 2 buttons. when click button want slide next activity. have 2 anim files:

  1. slide in:

    <set xmlns:android="schemas.android.com/apk/res/android">;     <translate android:fromxdelta="50%p"          android:toxdelta="0"         android:duration="@android:integer/config_mediumanimtime"/>      <alpha         android:fromalpha="0.0"          android:toalpha="1.0"         android:duration="@android:integer/config_mediumanimtime" />  </set> 
  2. fade out:

    <set xmlns:android="schemas.android.com/apk/res/android">;      <translate android:fromxdelta="0" android:toxdelta="-50%p"         android:duration="@android:integer/config_mediumanimtime"/>      <alpha          android:fromalpha="1.0" android:toalpha="0.0"         android:duration="@android:integer/config_mediumanimtime" />  </set>  

and java code:

 overridependingtransition(r.anim.fade_in, r.anim.fade_out); 

but when slide, see left side goes black second actvitiy. how can slide without black side?

i know have java code right (although using fade_in instead of slide in mentioned in comments).

to slide in i've used code in past:

<set xmlns:android="http://schemas.android.com/apk/res/android"> <translate android:fromxdelta="100%" android:toxdelta="0%" android:duration="600" /> </set> 

and slide out, it's opposite:

<set xmlns:android="http://schemas.android.com/apk/res/android"> <translate android:fromxdelta="0%" android:toxdelta="-100%" android:duration="600" /> </set> 

that should work, tell me if doesn't!


Comments

Popular posts from this blog

c++ - Is it possible to compile a VST on linux? -

c# - SharpSVN - How to get the previous revision? -

php cli reading files and how to fix it? -