ContextWrapper.AttachBaseContext(Context) 方法

定義

為這個 ContextWrapper 設定基礎上下文。

[Android.Runtime.Register("attachBaseContext", "(Landroid/content/Context;)V", "GetAttachBaseContext_Landroid_content_Context_Handler")]
protected virtual void AttachBaseContext(Android.Content.Context? base);
[<Android.Runtime.Register("attachBaseContext", "(Landroid/content/Context;)V", "GetAttachBaseContext_Landroid_content_Context_Handler")>]
abstract member AttachBaseContext : Android.Content.Context -> unit
override this.AttachBaseContext : Android.Content.Context -> unit

參數

base
Context

這個包裝器的新基礎上下文。

屬性

備註

為這個 ContextWrapper 設定基礎上下文。 所有通話將被委派至基站上下文。 如果基礎上下文已經設定好,則會拋出 IllegalStateException。

Java 文件 android.content.ContextWrapper.attachBaseContext(android.content.Context)

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

適用於