Naman Choradia Naman Choradia - 1 month ago 11
Android Question

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.

Answer

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