Activity.SetIntent(Intent, ComponentCaller) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
改變由 #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 所創建與分享的作品,並依授權條款所描述的使用進行修改。