Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android transition not working on phone

I created some transitions between activities that are working fine in the emulator, but nothing of them can be seen on the phone (neither fade in-out nor slide). The new activity simply appears like I have not implemented any transitions. Why is that?

fadein.xml

<?xml version="1.0" encoding="utf-8"?>
<alpha xmlns:android="http://schemas.android.com/apk/res/android"
   android:interpolator="@android:anim/accelerate_interpolator"
   android:fromAlpha="0.0" android:toAlpha="1.0" android:duration="1000" />   

fadeout.xml

<?xml version="1.0" encoding="utf-8"?>
    <alpha xmlns:android="http://schemas.android.com/apk/res/android"
       android:interpolator="@android:anim/accelerate_interpolator"
       android:fromAlpha="1.0" android:toAlpha="0.0" android:duration="1000" />

And i set in the appropriate activity

 overridePendingTransition(R.anim.fadein, R.anim.fadeout);
like image 603
erdomester Avatar asked Nov 29 '22 16:11

erdomester


1 Answers

Make sure that animations are enabled on device. For this go to Settings->Display->Animations and select "All Animations".

like image 175
inazaruk Avatar answered Dec 09 '22 21:12

inazaruk