f2prateek / dart

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

using with setResult #121

Closed alexzaitsev closed 8 years ago

alexzaitsev commented 8 years ago

Hello and thanks for nice library. I've tried to use it and there is one missed thing: using it with setResult. Is it possible? Or will this point be added to the enhancements list?

stephanenicolas commented 8 years ago

Can you give a more clear example ?

2016-06-13 4:09 GMT-07:00 Alexander Zaitsev notifications@github.com:

Hello and thanks for nice library. I've tried to use it and there is one missed thing: using it with setResult. Is it possible? Or will this point be added to the enhancements list?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/f2prateek/dart/issues/121, or mute the thread https://github.com/notifications/unsubscribe/ABv33Wh2oDfU05tJ7PXELePcYX4Etmc3ks5qLTpsgaJpZM4I0OLB .

alexzaitsev commented 8 years ago
Intent intent = new Intent();
intent.putExtra(EXTRA_GO_DATE, dateGo.getTime());
setResult(RESULT_FIRST_USER, intent);
finish();

This is back mechanism when you return something from current to calling activity.

stephanenicolas commented 8 years ago

You can still use Henson to create the intent and pass it to setResult, no ?

2016-06-13 5:37 GMT-07:00 Alexander Zaitsev notifications@github.com:

Intent intent = new Intent(); intent.putExtra(EXTRA_GO_DATE, dateGo.getTime()); setResult(RESULT_FIRST_USER, intent);

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/f2prateek/dart/issues/121#issuecomment-225568706, or mute the thread https://github.com/notifications/unsubscribe/ABv33d8tIYWKmDJagm0zFnOUP4GiGdmTks5qLU71gaJpZM4I0OLB .

alexzaitsev commented 8 years ago

I haven't found such example or something helpful. Could you point me the right direction?

stephanenicolas commented 8 years ago

Henson....build() will return an intent. You simply have to use later on.

Can you give it a try and close the issue if it's solved ?

2016-06-13 5:42 GMT-07:00 Alexander Zaitsev notifications@github.com:

I haven't found such example or something helpful.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/f2prateek/dart/issues/121#issuecomment-225569858, or mute the thread https://github.com/notifications/unsubscribe/ABv33devcapF47cmHnU1Cc4CioAdXjXQks5qLVAsgaJpZM4I0OLB .