Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android: makeSceneTransition for more than one shared elements

I have been trying to implement animation transition on more than one shared elements using the sample example showed on the android site

    ActivityOptions options = ActivityOptions.makeSceneTransitionAnimation(this,
    Pair.create(view1, "agreedName1"),
    Pair.create(view2, "agreedName2"));

but when I try to implement this code on my example application in the Eclipse IDE it says

The method makeSceneTransitionAnimation(Activity, View, String) in the type ActivityOptions is not applicable for the arguments (MyActivity, Pair<View,String>, Pair<View,String>)

I could use some help there. Thanks.

like image 449
Naman Choradia Avatar asked Nov 10 '22 17:11

Naman Choradia


1 Answers

I just came across the same issue. In my case I've imported

import android.support.v4.util.Pair;

instead of

import android.util.Pair;
like image 151
Robby Groot Avatar answered Nov 14 '22 23:11

Robby Groot