Naman Choradia Naman Choradia - 1 year ago 88
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 Source

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


instead of

import android.util.Pair;
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download