android - Activity transitions not animating -


i've been learning material transitions, following this guide. have little test app i'm trying out.

my activity code looks this:

import android.content.intent; import android.support.v7.app.appcompatactivity; import android.os.bundle; import android.transition.slide; import android.view.view;  public class transitionshome extends appcompatactivity {      @override     protected void oncreate(bundle savedinstancestate) {         super.oncreate(savedinstancestate);         setcontentview(r.layout.activity_transitions_home);     }      public void slide(view view){         //create slide object, set exit transition         slide slide = new slide();         slide.setduration(1000);         getwindow().setexittransition(slide);          startactivity(new intent(this, slideactivity.class));     } 

i have button calls slide() when it's pressed.

the problem is, it's changing proper activity, isn't animating @ all. why doesn't work?

call startactivity this:

startactivity(intent,activityoptions.makescenetransitionanimation(this).tobundle()); 

Comments