語言

Activity.SetIntent(Intent, ComponentCaller) 方法

定義

改變由 #getIntent、 返回的意圖,以及 由 返回的 ComponentCaller 。#getCaller

[Android.Runtime.Register("setIntent", "(Landroid/content/Intent;Landroid/app/ComponentCaller;)V", "GetSetIntent_Landroid_content_Intent_Landroid_app_ComponentCaller_Handler", ApiSince=35)]
public virtual void SetIntent(Android.Content.Intent? newIntent, Android.App.ComponentCaller? newCaller);
[<Android.Runtime.Register("setIntent", "(Landroid/content/Intent;Landroid/app/ComponentCaller;)V", "GetSetIntent_Landroid_content_Intent_Landroid_app_ComponentCaller_Handler", ApiSince=35)>]
abstract member SetIntent : Android.Content.Intent * Android.App.ComponentCaller -> unit
override this.SetIntent : Android.Content.Intent * Android.App.ComponentCaller -> unit

參數

newIntent
Intent

新的意圖物件要返回 #getIntent

newCaller
ComponentCaller

新的 ComponentCaller 返回對象 #getCaller

屬性

備註

改變 getIntent() 回傳的意圖,以及 getCaller() 回傳的 ComponentCaller。 此中包含對特定意圖及 ComponentCalller 的參考;它不會複製他們。 常與 onNewIntent(Intent) 一起使用。 若要從 onNewIntent(Intent) 取得呼叫者,請使用 getCurrentCaller(),否則覆寫 onNewIntent(Intent,ComponentCaller)。

另請參閱:

Android 參考資料。android.app.Activity.setIntent

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於