Språk

Fragment.StartActivityForResult Method

Definition

Overloads

Name Description
StartActivityForResult(Intent, Int32)

Starts an activity through the fragment's host, optionally for a result.

StartActivityForResult(Intent, Int32, Bundle)

Starts an activity through the fragment's host, optionally for a result.

StartActivityForResult(Intent, Int32)

Starts an activity through the fragment's host, optionally for a result.

[Android.Runtime.Register("startActivityForResult", "(Landroid/content/Intent;I)V", "GetStartActivityForResult_Landroid_content_Intent_IHandler")]
public virtual void StartActivityForResult(Android.Content.Intent? intent, int requestCode);
[<Android.Runtime.Register("startActivityForResult", "(Landroid/content/Intent;I)V", "GetStartActivityForResult_Landroid_content_Intent_IHandler")>]
abstract member StartActivityForResult : Android.Content.Intent * int -> unit
override this.StartActivityForResult : Android.Content.Intent * int -> unit

Parameters

intent
Intent

Intent

requestCode
Int32

int

Attributes

Remarks

Starts an activity through the fragment's host. An activity host supports result requests. The default FragmentHostCallback throws if requestCode is not -1.

Android reference for android.app.Fragment.startActivityForResult.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

StartActivityForResult(Intent, Int32, Bundle)

Starts an activity through the fragment's host, optionally for a result.

[Android.Runtime.Register("startActivityForResult", "(Landroid/content/Intent;ILandroid/os/Bundle;)V", "GetStartActivityForResult_Landroid_content_Intent_ILandroid_os_Bundle_Handler")]
public virtual void StartActivityForResult(Android.Content.Intent? intent, int requestCode, Android.OS.Bundle? options);
[<Android.Runtime.Register("startActivityForResult", "(Landroid/content/Intent;ILandroid/os/Bundle;)V", "GetStartActivityForResult_Landroid_content_Intent_ILandroid_os_Bundle_Handler")>]
abstract member StartActivityForResult : Android.Content.Intent * int * Android.OS.Bundle -> unit
override this.StartActivityForResult : Android.Content.Intent * int * Android.OS.Bundle -> unit

Parameters

intent
Intent

Intent

requestCode
Int32

int

options
Bundle

Bundle

Attributes

Remarks

Starts an activity through the fragment's host. An activity host forwards the options and supports result requests. The default FragmentHostCallback throws if requestCode is not -1 and does not forward the options.

Android reference for android.app.Fragment.startActivityForResult.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to