erdomester
erdomester

Reputation: 11829

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);

Upvotes: 4

Views: 3150

Answers (3)

Sahil Bansal
Sahil Bansal

Reputation: 729

Go to Settigs then developer options and check for the options that are related to animation and assure that each one of animation option is switched on

Upvotes: 0

Sagar Devanga
Sagar Devanga

Reputation: 2819

Enable the transition animation

Settings -> Developer Options -> Transition Animation Scale -> 1x

Upvotes: 7

inazaruk
inazaruk

Reputation: 74780

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

Upvotes: 14

Related Questions