f2prateek / dart

Extras binding and intent builders for Android apps.
Apache License 2.0
1.19k stars 88 forks source link

SharedElement #113

Closed joxad closed 8 years ago

joxad commented 8 years ago

Hi, I am currently using transition with SharedElement, and I have not found a way to add Options to make transition. For exemple, if I want to share my icon user :

Intent intent = new Intent(context, ActivityUser.class);
ActivityOptionsCompat options = ActivityOptionsCompat.
                makeSceneTransitionAnimation((Activity) context, binding.ivUser, context.getString(R.string.transition_activity_profile));
ActivityCompat.startActivity((Activity) context, intent, options.toBundle());

Is there a way to add something like :

activity.startActivity(Henson.with(activity).gotoActivityUser().withOptions(options).build());
dlemures commented 8 years ago

Hi @joxad ,

Henson is used to create the intent. That bundle with options for the transition is not part of the Intent, so It has nothing to do with Henson:

Intent intent = Henson.with(activity).gotoActivityUser().build();
startActivity(intent, options.toBundle());
joxad commented 8 years ago

Ah yes stupid me ! TU