Bug 7724 - OnActivityResult signature in fragments
Summary: OnActivityResult signature in fragments
Alias: None
Product: Android
Classification: Xamarin
Component: BCL Class Libraries ()
Version: 4.2.x
Hardware: PC Windows
: Normal normal
Target Milestone: master
Assignee: Atsushi Eno
Depends on:
Reported: 2012-10-08 10:36 UTC by Goncalo Oliveira
Modified: 2016-09-20 11:33 UTC (History)
4 users (show)

Tags: XATriaged
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report for Bug 7724 on Developer Community or GitHub if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:

Description Goncalo Oliveira 2012-10-08 10:36:17 UTC
This is a minor bug, or better yet, improvement, as it's not really something that prevents things from getting done, but I think it is worth mentioning.

The OnActivityResult signature in the Activity class was changed for a more readable format

protected virtual void OnActivityResult( int requestCode, Result resultCode, Intent data );

The Fragment class however was not changed and has a sort of unfriendly signature. First because the parameter names are not very specific, second because the enum isn't there.

public virtual void OnActivityResult( int p0, int p1, Intent p2 );

Again, this is not serious at all, since by reading the documentation (or checking the signature in the Activity) it's easy enough to figure that p1 is the resultCode and it's easily casted to the Result enum. However, it would be a nice to have.
Comment 1 Atsushi Eno 2012-11-07 10:34:06 UTC
Yes, I also really want to enable parameter name retrieval on these support API, but we are prohibited to make breaking API changes (it will at least bring changes on event args properties). Though int->enum change is doable, I'll take a look.